You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Supabase MCP's get_logs tool fails when requesting edge function logs due to a Column Level Security restriction. The tool uses a wildcard query (SELECT * FROM function_logs) which triggers a "restricted wildcard (*) in a result column" error.
"Restricted roles cannot use the wildcard operator (*) on the affected table. Instead of using SELECT * FROM <restricted_table>; or its API equivalent, you must specify the column names explicitly."
The query should be modified to explicitly list columns:
case'edge-function':
returnstripIndent` select id, function_logs.timestamp, event_message, metadata.event_type, metadata.function_id, metadata.level from function_logs cross join unnest(metadata) as metadata order by timestamp desc limit ${limit} `;
This would allow users to access edge function logs through the MCP server without encountering Column Level Security restrictions.
The text was updated successfully, but these errors were encountered:
Bug report
Describe the bug
The Supabase MCP's
get_logs
tool fails when requesting edge function logs due to a Column Level Security restriction. The tool uses a wildcard query (SELECT * FROM function_logs
) which triggers a "restricted wildcard (*) in a result column" error.To Reproduce
Expected behavior
The
get_logs
tool should successfully retrieve edge function logs by using explicit column names instead of the wildcard selector.System information
Additional context
The issue is in the
getLogQuery
function (from logs.js) which generates SQL for different service types. For edge functions, it uses:This violates Column Level Security restrictions as documented at https://supabase.com/docs/guides/database/postgres/column-level-security:
The query should be modified to explicitly list columns:
This would allow users to access edge function logs through the MCP server without encountering Column Level Security restrictions.
The text was updated successfully, but these errors were encountered: