Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

Assemble SQL query context for Terms

get_query_context
Read-onlyIdempotent

Assembles qualified tables, mapped columns, join paths, verified example queries, glossary entries, and dialect rules for specified terms so you can write SQL without separate lookups.

Instructions

Assemble everything needed to write SQL for a set of Terms: qualified tables, mapped columns with sample values/formats, SQL attributes, the connecting join path (with FROM/JOIN SQL and role notes), verified example queries, glossary entries, and dialect rules. Call after check_answerable instead of calling get_term, describe_table, and find_join_path separately; use lookup_values next for exact filter literals. Lists unknown inputs under unresolved with suggestions, and fails if zero Terms resolve.

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": {
      "terms": "<terms>"
    },
    "name": "get_query_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
termsYesList of Term names, synonyms, or ids needed to answer the question.
questionNoUser question used to retrieve matching verified example SQL queries.
datasourceNoDatasource name. Optional when only one datasource is registered.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.2
    • changedInput schema / properties / question / description
      Previous value: -"The question, to find verified example queries."New value: +"User question used to retrieve matching verified example SQL queries."
    • changedInput schema / properties / terms / description
      Previous value: -"Terms you will use (names, synonyms or ids)."New value: +"List of Term names, synonyms, or ids needed to answer the question."
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered structurally. The description adds genuine behavioral disclosure beyond that: it reports partial-failure handling ('lists unknown inputs under unresolved with suggestions') and a hard failure condition ('fails if zero Terms resolve'), which an agent cannot get from annotations. It stops short of covering cost, latency, or how much context is returned for large term sets.

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 verb and the inventory, then the ordering guidance, then the failure semantics — a sensible priority order with no filler sentences. The output inventory is a long enumeration, but each item is a distinct payload component rather than padding. Slightly dense, yet everything stated earns its place.

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?

For a high-complexity orchestration tool, it covers composition, prerequisites, sibling substitution, follow-up, and failure behavior. An output schema exists, so return values correctly go unexplained. Nothing an agent needs in order to decide to call it and interpret partial resolution 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 description coverage is 100%, so all three parameters are already documented in the schema, including the question-to-example-query link and the optional-datasource rule. The description adds no syntax, format, or constraint detail beyond that. Baseline 3 applies when the schema carries the parameter burden.

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?

Uses a specific verb ('Assemble') with a clearly scoped resource ('everything needed to write SQL for a set of Terms') and then enumerates the concrete payload: qualified tables, mapped columns with sample values, join paths with FROM/JOIN SQL, verified example queries, glossary entries, dialect rules. It explicitly frames itself as a replacement for get_term, describe_table, and find_join_path, so an agent can distinguish it from those siblings without opening any schema.

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 explicit sequencing ('Call after check_answerable'), explicit alternatives it supersedes ('instead of calling get_term, describe_table, and find_join_path separately'), and an explicit next step ('use lookup_values next for exact filter literals'). Both the when and the what-comes-next are stated, leaving nothing to inference.

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