# search_docs

Search the Supabase documentation using GraphQL. Must be a valid GraphQL query. You should default to calling this even if you think you already know the answer, since the documentation is always being updated. Below is the GraphQL schema for this tool: schema{query:RootQueryType}type Guide implements SearchResult{title:String href:String content:String subsections:SubsectionCollection}interface SearchResult{title:String href:String content:String}type SubsectionCollection{edges:[SubsectionEdge!]! nodes:[Subsection!]! totalCount:Int!}type SubsectionEdge{node:Subsection!}type Subsection{title:String href:String content:String}type CLICommandReference implements SearchResult{title:String href:String content:String}type ManagementApiReference implements SearchResult{title:String href:String content:String}type ClientLibraryFunctionReference implements SearchResult{title:String href:String content:String language:Language! methodName:String}enum Language{JAVASCRIPT SWIFT DART CSHARP KOTLIN PYTHON}type TroubleshootingGuide implements SearchResult{title:String href:String content:String}type RootQueryType{schema:String! searchDocs(query:String!,limit:Int):SearchResultCollection error(code:String!,service:Service!):Error errors(first:Int after:String last:Int before:String service:Service code:String):ErrorCollection}type SearchResultCollection{edges:[SearchResultEdge!]! nodes:[SearchResult!]! totalCount:Int!}type SearchResultEdge{node:SearchResult!}type Error{code:String! service:Service! httpStatusCode:Int message:String}enum Service{AUTH REALTIME STORAGE}type ErrorCollection{edges:[ErrorEdge!]! nodes:[Error!]! pageInfo:PageInfo! totalCount:Int!}type ErrorEdge{node:Error! cursor:String!}type PageInfo{hasNextPage:Boolean! hasPreviousPage:Boolean! startCursor:String endCursor:String}

Agent View of the PolicyLayer registry record for `search_docs`. HTML page: https://policylayer.com/tools/supabase/search-docs

## Facts

- Tool: `search_docs`
- Server: Supabase (`@modelcontextprotocol/server-supabase`) — https://policylayer.com/tools/supabase.md
- Install: `npx -y @modelcontextprotocol/server-supabase`
- Homepage: https://github.com/supabase-community/supabase-mcp
- Risk category: Read (Low risk)
- Registry record: grade D, identity verified
- Server auth posture: gated
- Server rate-limited: no
- Parameters: 1
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `graphql_query` | string | no | GraphQL query string |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_docs",
    "arguments": {}
  }
}
```

## Why search_docs is rated Low

This tool retrieves and queries documentation data only. It has no side effects, cannot modify or delete data, and cannot execute operations or move money. The GraphQL schema shows only query types (RootQueryType) with read-only return types containing documentation metadata and content.

From the tool's own definition: "Tool performs 'Search the Supabase documentation using GraphQL' with return types limited to documentation content (Guide, SearchResult with title, href, content fields). No mutation capability, no data modification, no destructive operations."

## Use case

AI agents call search_docs to retrieve information from Supabase without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Supabase:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "search_docs": {}
  }
}
```

## Other tools on Supabase (28)

- `delete_branch` — Destructive — https://policylayer.com/tools/supabase/delete-branch.md
- `pause_project` — Destructive — https://policylayer.com/tools/supabase/pause-project.md
- `reset_branch` — Destructive — https://policylayer.com/tools/supabase/reset-branch.md
- `apply_migration` — Execute — https://policylayer.com/tools/supabase/apply-migration.md
- `deploy_edge_function` — Execute — https://policylayer.com/tools/supabase/deploy-edge-function.md
- `execute_sql` — Execute — https://policylayer.com/tools/supabase/execute-sql.md
- `merge_branch` — Execute — https://policylayer.com/tools/supabase/merge-branch.md
- `rebase_branch` — Execute — https://policylayer.com/tools/supabase/rebase-branch.md
- `confirm_cost` — Financial — https://policylayer.com/tools/supabase/confirm-cost.md
- `generate_typescript_types` — Read — https://policylayer.com/tools/supabase/generate-typescript-types.md
- `get_advisors` — Read — https://policylayer.com/tools/supabase/get-advisors.md
- `get_cost` — Read — https://policylayer.com/tools/supabase/get-cost.md
- `get_edge_function` — Read — https://policylayer.com/tools/supabase/get-edge-function.md
- `get_logs` — Read — https://policylayer.com/tools/supabase/get-logs.md
- `get_organization` — Read — https://policylayer.com/tools/supabase/get-organization.md
- `get_project` — Read — https://policylayer.com/tools/supabase/get-project.md
- `get_project_url` — Read — https://policylayer.com/tools/supabase/get-project-url.md
- `get_publishable_keys` — Read — https://policylayer.com/tools/supabase/get-publishable-keys.md
- `list_branches` — Read — https://policylayer.com/tools/supabase/list-branches.md
- `list_edge_functions` — Read — https://policylayer.com/tools/supabase/list-edge-functions.md
- `list_extensions` — Read — https://policylayer.com/tools/supabase/list-extensions.md
- `list_migrations` — Read — https://policylayer.com/tools/supabase/list-migrations.md
- `list_organizations` — Read — https://policylayer.com/tools/supabase/list-organizations.md
- `list_projects` — Read — https://policylayer.com/tools/supabase/list-projects.md
- `list_tables` — Read — https://policylayer.com/tools/supabase/list-tables.md
- `create_branch` — Write — https://policylayer.com/tools/supabase/create-branch.md
- `create_project` — Write — https://policylayer.com/tools/supabase/create-project.md
- `restore_project` — Write — https://policylayer.com/tools/supabase/restore-project.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=supabase · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/supabase
