Skip to main content
Glama
kosminus

querywise-mcp

get_semantic_context

Read-only

Assembles SQL-ready context for a natural language question by retrieving relevant tables, columns, foreign keys, business glossary, and example queries.

Instructions

Assemble grounded, SQL-ready context for a question.

Returns the relevant tables/columns, foreign keys, business glossary, metric definitions, value dictionaries, knowledge excerpts, and example queries as formatted text. This is the recommended first step of the lightweight path: take the result, write a read-only SELECT yourself, then call run_sql. Needs no LLM key. For a fully automated answer instead, use ask.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionYesTarget database connection — its name or id (case-insensitive). List the available connections with list_connections.
questionYesThe natural-language question you intend to answer with SQL; used to select the most relevant schema and semantic-layer entries.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true. The description reinforces this by mentioning 'read-only SELECT' and explains the typical workflow. It adds context about the lightweight path but does not disclose additional behavioral traits beyond 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?

The description is concise, well-structured, and front-loaded with the main purpose. Each sentence adds value without redundancy. It efficiently conveys the tool's role, output, and workflow.

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?

The description adequately covers the tool's return values (tables, columns, foreign keys, etc.) and explains the workflow. Given the presence of an output schema, further detailing return types is unnecessary. The description is sufficient for an agent to understand the tool's role.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptive parameter descriptions. The description adds value by explaining the 'question' parameter is 'used to select the most relevant schema and semantic-layer entries' and that 'connection' should be listed via list_connections, complementing the schema.

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 explicitly states the tool's purpose: 'Assemble grounded, SQL-ready context for a question.' It lists the specific components returned (tables, columns, foreign keys, etc.) and distinguishes itself from sibling tools like 'ask' (fully automated) and 'run_sql' (execution).

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?

The description provides clear guidance: 'This is the recommended first step of the lightweight path: take the result, write a read-only SELECT yourself, then call run_sql.' It also notes it needs no LLM key and offers an alternative: 'For a fully automated answer instead, use ask.'

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kosminus/querywise-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server