Skip to main content
Glama

gograph_schema

Read-onlyIdempotent

Find Go structs mapped to a specific database table via struct tags. Identifies ORM models by table name for migration and schema tracing.

Instructions

Find Go structs that declare a mapping to a specific database table via struct tags (e.g., db:"table_name", gorm:"table:table_name"). The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. WHEN TO USE: When tracing which Go types represent a database table, or before writing a migration to understand the current ORM model. NOT TO USE: For non-tagged Go structs used as query results (use gograph_fields or gograph_query instead). RETURNS: Matching struct names with package paths and file locations; empty when no structs map to the named table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum rows per page; the byte budget may return fewer.
tableYesThe table or schema name to search for in struct tags (e.g., 'users', 'roles')
cursorNoOpaque next_cursor for the same graph snapshot and result selection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.5
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Opaque next_cursor for the same graph snapshot and result selection.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 100,
      +  "description": "Maximum rows per page; the byte budget may return fewer.",
      +  "maximum": 200,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Changed1 schema field changedv1.4.70
    • changedInput schema / properties / table / description
      Previous value: -"The table or schema name (e.g., 'users')"New value: +"The table or schema name to search for in struct tags (e.g., 'users', 'roles')"
  3. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description is consistent ("Read-only; no side effects"). It adds genuinely new behavioral context beyond annotations: freshness checking before the call, refresh in the requested analysis mode, and CHA/SSA retry after source changes in precise modes.

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 purpose, then clearly sectioned WHEN TO USE / NOT TO USE / RETURNS. Efficient overall, though the freshness/CHA-SSA sentence is dense and slightly tangential to selection.

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

Completeness5/5

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

No output schema exists, and the description supplies the return shape (struct names, package paths, file locations, empty result semantics). Combined with purpose, usage, and behavioral notes, an agent has everything needed to call it correctly.

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 table, limit, and cursor with clear semantics. The description adds no parameter-level detail beyond the schema, so the baseline 3 applies.

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 states a specific verb (find) and resource (Go structs mapping to a DB table via struct tags) with concrete examples of the tag forms (db:"table_name", gorm:"table:table_name"). It is clearly distinguishable from siblings like gograph_fields, gograph_query, and gograph_sql.

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?

Explicit WHEN TO USE (tracing which types represent a table, pre-migration ORM model inspection) and NOT TO USE (non-tagged structs as query results) with named alternatives gograph_fields and gograph_query. Nothing is left to inference.

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