Skip to main content
Glama
HenkDz

Self-Hosted Supabase MCP Server

generate_typescript_types

Generate TypeScript types from your Supabase database schema and save them to a specified file path for type-safe development.

Instructions

Generates TypeScript types from the database schema using the Supabase CLI (supabase gen types) and downloads the file to the specified absolute path. The tool returns the current platform (win32, darwin, linux) to help with path formatting. Requires DATABASE_URL configuration and Supabase CLI installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
included_schemasNoDatabase schemas to include in type generation.
output_filenameNoFilename to save the generated types to in the workspace root.database.types.ts
output_pathYesAbsolute path where to download the generated TypeScript file. Examples: Windows: "C:\\path\\to\\project\\database.types.ts", macOS/Linux: "/path/to/project/database.types.ts". This parameter is required.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context beyond basic functionality by mentioning the download action, platform return for path formatting, and prerequisites. However, it lacks details on error handling, rate limits, or what happens if the file already exists, which are important for a tool that writes files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the core purpose stated first, followed by key behavioral details and prerequisites. Every sentence adds necessary information without redundancy, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (file generation with prerequisites) and no output schema, the description is mostly complete. It covers the purpose, key behavior, and prerequisites, but could improve by detailing the return value format or error scenarios. However, it adequately supports tool selection and invocation in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some value by implying the use of 'supabase gen types' and mentioning platform-specific path examples, but it does not provide additional semantic details beyond what the schema specifies, such as format constraints or interactions between parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Generates TypeScript types from the database schema') using the Supabase CLI, identifies the resource ('database schema'), and distinguishes it from sibling tools like 'execute_sql' or 'list_tables' by focusing on type generation rather than data manipulation or listing operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('Generates TypeScript types from the database schema') and mentions prerequisites ('Requires DATABASE_URL configuration and Supabase CLI installed'), but it does not explicitly state when not to use it or name specific alternatives among the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/HenkDz/selfhosted-supabase-mcp'

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