send_management_api_request
Send requests to the Supabase Management API to programmatically manage project resources, configurations, and settings using specified HTTP methods, paths, and parameters.
Instructions
Execute a Supabase Management API request.
This tool allows you to make direct calls to the Supabase Management API, which provides programmatic access to manage your Supabase project settings, resources, and configurations.
REQUEST FORMATTING:
Use paths exactly as defined in the API specification
The {ref} parameter will be automatically injected from settings
Format request bodies according to the API specification
PARAMETERS:
method: HTTP method (GET, POST, PUT, PATCH, DELETE)
path: API path (e.g. /v1/projects/{ref}/functions)
path_params: Path parameters as dict (e.g. {"function_slug": "my-function"}) - use empty dict {} if not needed
request_params: Query parameters as dict (e.g. {"key": "value"}) - use empty dict {} if not needed
request_body: Request body as dict (e.g. {"name": "test"}) - use empty dict {} if not needed
PATH PARAMETERS HANDLING:
The {ref} placeholder (project reference) is automatically injected - you don't need to provide it
All other path placeholders must be provided in the path_params dictionary
Common placeholders include:
{function_slug}: For Edge Functions operations
{id}: For operations on specific resources (API keys, auth providers, etc.)
{slug}: For organization operations
{branch_id}: For database branch operations
{provider_id}: For SSO provider operations
{tpa_id}: For third-party auth operations
EXAMPLES:
GET request with path and query parameters: method: "GET" path: "/v1/projects/{ref}/functions/{function_slug}" path_params: {"function_slug": "my-function"} request_params: {"version": "1"} request_body: {}
POST request with body: method: "POST" path: "/v1/projects/{ref}/functions" path_params: {} request_params: {} request_body: {"name": "test-function", "slug": "test-function"}
SAFETY SYSTEM: API operations are categorized by risk level:
LOW RISK: Read operations (GET) - allowed in SAFE mode
MEDIUM/HIGH RISK: Write operations (POST, PUT, PATCH, DELETE) - require UNSAFE mode
EXTREME RISK: Destructive operations - require UNSAFE mode and confirmation
BLOCKED: Some operations are completely blocked for safety reasons
SAFETY CONSIDERATIONS:
By default, the API client starts in SAFE mode, allowing only read operations
To perform write operations, first use live_dangerously(service="api", enable=True)
High-risk operations will be rejected with a confirmation ID
Use confirm_destructive_operation with the provided ID after reviewing risks
Some operations may be completely blocked for safety reasons
For a complete list of available API endpoints and their parameters, use the get_management_api_spec tool. For details on safety rules, use the get_management_api_safety_rules tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | ||
| path | Yes | ||
| path_params | Yes | ||
| request_body | Yes | ||
| request_params | Yes |
Implementation Reference
- supabase_mcp/tools/registry.py:79-96 (handler)Primary MCP tool handler and registration for 'send_management_api_request'. This decorated function is exposed to the MCP client and handles input parameters before delegating to the feature manager.@mcp.tool(description=tool_manager.get_description(ToolName.SEND_MANAGEMENT_API_REQUEST)) # type: ignore async def send_management_api_request( method: str, path: str, path_params: dict[str, str], request_params: dict[str, Any], request_body: dict[str, Any], ) -> dict[str, Any]: """Execute a Supabase Management API request.""" return await feature_manager.execute_tool( ToolName.SEND_MANAGEMENT_API_REQUEST, services_container=services_container, method=method, path=path, path_params=path_params, request_params=request_params, request_body=request_body, )
- Core implementation of the send_management_api_request logic. This method retrieves the API manager from the services container and executes the actual Management API request.async def send_management_api_request( self, container: "ServicesContainer", method: str, path: str, path_params: dict[str, str], request_params: dict[str, Any], request_body: dict[str, Any], ) -> dict[str, Any]: """Execute a Supabase Management API request.""" api_manager = container.api_manager return await api_manager.execute_request(method, path, path_params, request_params, request_body)
- supabase_mcp/tools/manager.py:26-26 (registration)Definition of the ToolName enum value for 'send_management_api_request', used throughout the codebase for tool identification and dispatching.SEND_MANAGEMENT_API_REQUEST = "send_management_api_request"
- Dispatch logic in FeatureManager.execute_tool that routes calls to the send_management_api_request method based on the tool name.elif tool_name == ToolName.SEND_MANAGEMENT_API_REQUEST: return await self.send_management_api_request(services_container, **kwargs)