Skip to main content
Glama

Pull Database Schema

pull_database_schema

Introspect the database and write a typed schema helper the app uses for queries (kysely on current projects; some legacy projects use drizzle or snake_case kysely — the pull matches whatever the project already uses). Usually NOT needed after execute_sql — schema-changing statements re-pull automatically. Use it to refresh manually, or with helper_name to generate the helper for an additional/external database. The helper is GENERATED — never hand-edit it or cast around its types: if a column's type is too loose (e.g. role as string when code expects "user" | "admin"), fix the DATABASE (CREATE TYPE … AS ENUM + ALTER COLUMN … TYPE) and re-pull, and the union type falls out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseNo
projectIdYes
helper_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations (readOnlyHint=false, openWorldHint=true) are consistent with this, and the description adds substantial context beyond them: the helper is GENERATED, must never be hand-edited or cast around, and loose types must be fixed in the DATABASE then re-pulled. This is exactly the extra behavioral context the dimension rewards.

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

Conciseness4/5

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

Front-loaded with the core action and the execute_sql relationship, then the usage cases. The closing type-fixing tangent is long and somewhat tangential, though genuinely useful, keeping this just short of a 5.

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?

For a write-oriented tool with no output schema and 0% param coverage, the description covers behavior, usage, and constraints thoroughly. The main gap is that the three parameters' semantics and formats remain largely undocumented.

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 0%, so the description must compensate. It explains helper_name's purpose (generate the helper for an additional/external database) and implies what `database` selects, but projectId and the exact semantics/format of `database` are left unexplained.

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?

States a specific verb+resource: "Introspect the database and write a typed schema helper the app uses for queries," and clarifies dialect handling (kysely, drizzle, snake_case kysely). This clearly distinguishes it from siblings like execute_sql and query_database.

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

Usage Guidelines5/5

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

Explicitly names the alternative and the condition that selects it: "Usually NOT needed after execute_sql — schema-changing statements re-pull automatically. Use it to refresh manually, or with helper_name..." It provides both when-to-use and when-not-to-use guidance.

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