Skip to main content
Glama

Generate TypeScript types

types.generate
Read-onlyIdempotent

The supabase-js Database TypeScript type for a branch's schema. Save it as database.types.ts and use createClient(url, key). Scope: database:read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "types.generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchNoBranch (environment) id. Optional: defaults to `production`.
schemasNoSchemas to include, default ["public"]
project_idNoProject id. Optional: defaults to the project created or used last in this session, or the only one.
organization_idNoOrganization id. Optional: defaults to the token's organization, or the only one you belong to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description usefully adds the required scope (database:read) and the shape of the returned artifact, but says nothing about output size for large schemas, ordering, or whether generation is cached/async. That is modest added value over the annotations.

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?

Two short sentences plus a scope tag: the artifact is front-loaded, the consumption instruction follows immediately, and the permission constraint closes it out. No filler or restated title.

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?

With no output schema, the description carries the burden of explaining what comes back, and it does so by naming the returned type and its intended file destination. For a zero-required-parameter read-only generator that is nearly complete; only edge cases like large multi-schema output are unaddressed.

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%: branch, schemas, project_id and organization_id each document their defaults in the schema. The description adds nothing about parameter semantics beyond the implicit 'branch's schema' framing, so the baseline 3 applies.

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

Purpose4/5

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

The description names the concrete artifact produced: the supabase-js `Database` TypeScript type for a branch's schema, which is specific verb+resource. No sibling tool produces generated types, so there is little ambiguity, though it never explicitly contrasts itself with table-inspection tools like tables.describe or database.tables.

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

Usage Guidelines3/5

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

It tells the agent what to do with the result (save as database.types.ts, pass to `createClient<Database>(url, key)`), which implies the usage context, and 'Scope: database:read' signals the permission needed. It gives no explicit when-not or alternative-tool guidance, so the routing signal is implied rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources