Skip to main content
Glama

Get schema

get_schema
Read-only

Get every table of one connection with its columns (name, type, nullable, primary key), and the description and synonyms of each table and column where the team or the database has one. Call it before writing SQL for execute_query, export_query_results or save_query, so table and column names match the real database instead of being guessed; read the descriptions to pick the right table and units. Call get_context too for the team's notes for AI and business definitions. Read-only. On a large database the response is long; fetch it once per conversation and reuse it. Refused on an approved_queries connection.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "connectionId": "<connectionId>"
    },
    "name": "get_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
connectionIdYesConnection id from list_connections.

Output Schema

NameRequiredDescriptionDefault
tablesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / tables / items / properties / columns / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": {},
      -      "properties": {
      -        "description": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "descriptionSource": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "isPrimaryKey": {
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "masked": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "nullable": {
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "synonyms": {
      -          "anyOf": [
      -            {
      -              "items": {
      -                "type": "string"
      -              },
      -              "type": "array"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "type": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "description": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "descriptionSource": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "isPrimaryKey": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "masked": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "nullable": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "owner": {
      +          "description": "The person or team responsible for this data. Point the user to them with questions about it.",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "synonyms": {
      +          "anyOf": [
      +            {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "type": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / tables / items / properties / owner
      Added value: +{
      +  "description": "The person or team responsible for this data. Point the user to them with questions about it.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed4 schema fields changed
    • changedOutput schema / properties / tables / items / properties / columns / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": {},
      -      "properties": {
      -        "isPrimaryKey": {
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "nullable": {
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "type": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "description": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "descriptionSource": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "isPrimaryKey": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "masked": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "nullable": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "synonyms": {
      +          "anyOf": [
      +            {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "type": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / tables / items / properties / description
      Added value: +{
      +  "description": "What the table holds, written by the team in SaturnSQL or taken from the database's own comment.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tables / items / properties / descriptionSource
      Added value: +{
      +  "description": "saturnsql when the team wrote the description in SaturnSQL, database when it is the database's own comment.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tables / items / properties / synonyms
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Other names people use for this table."
      +}
  3. Changed3 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / tables / items / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / tables / items / properties / columns / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "isPrimaryKey": {
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "nullable": {
      -          "type": [
      -            "boolean",
      -            "null"
      -          ]
      -        },
      -        "type": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "isPrimaryKey": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "nullable": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "type": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so 'Read-only' is redundant. Beyond that, the description adds genuinely new behavior: the response is long on large databases, it should be fetched once per conversation and reused, and it is refused on approved_queries connections. The remaining gap is that the refusal is not described as an error versus an empty result, but the operational guidance is well above the annotation baseline.

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?

The purpose and return contents are front-loaded, then usage, then operational caveats. Nearly every sentence earns its place, though 'Read-only' duplicates the readOnlyHint annotation and could be dropped.

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?

An output schema exists, so return values need not be explained. For a single-parameter read tool, the definition covers what it returns, when to call it, what to pair it with, caching behavior, and a refusal condition — nothing an agent needs in order to call it correctly is missing.

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 coverage is 100% and the single connectionId parameter is already documented as 'Connection id from list_connections.' The description adds no syntax, format, or validation detail beyond that, so the baseline of 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?

States a specific verb and resource with scope: 'Get every table of one connection with its columns (name, type, nullable, primary key)' plus descriptions and synonyms. The scope is bounded to a single connection, and the enrichment metadata it returns is spelled out, so an agent knows exactly what it gets and how it differs from get_context.

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?

Gives an explicit trigger ('Call it before writing SQL for execute_query, export_query_results or save_query'), names the sibling to pair it with ('Call get_context too for the team's notes'), and states an exclusion ('Refused on an approved_queries connection'). Both when-to-use and when-not-to-use are covered.

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