Skip to main content
Glama
Apache 2.0
845
2,105
  • Apple
docs-tools.ts1.21 kB
import { tool } from '@supabase/mcp-utils'; import { source } from 'common-tags'; import { z } from 'zod'; import type { ContentApiClient } from '../content-api/index.js'; export type DocsToolsOptions = { contentApiClient: ContentApiClient; }; export function getDocsTools({ contentApiClient }: DocsToolsOptions) { return { search_docs: tool({ description: source` 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 the Supabase docs endpoint: ${contentApiClient.schema} `, annotations: { title: 'Search docs', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, parameters: z.object({ // Intentionally use a verbose param name for the LLM graphql_query: z.string().describe('GraphQL query string'), }), execute: async ({ graphql_query }) => { return await contentApiClient.query({ query: graphql_query }); }, }), }; }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/supabase-community/mcp-supabase'

If you have feedback or need assistance with the MCP directory API, please join our Discord server