Skip to main content
Glama

query_decisions

Retrieve and filter decision records from a knowledge graph to answer why specific code architecture or technical choices were made, linking decisions directly to code elements.

Instructions

Query the decision knowledge graph. Filter by type, subproject, code symbol, file path, tag, or time. Returns decisions linked to code — "why was this architecture chosen?" answered with the actual decision record. Use service_name to filter by a specific subproject within the project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoFilter by decision type
service_nameNoFilter by subproject name (e.g., "auth-api")
symbol_idNoFilter by linked symbol FQN
file_pathNoFilter by linked file path
tagNoFilter by tag
searchNoFull-text search query (FTS5 with porter stemming)
as_ofNoOnly decisions active at this ISO timestamp
include_invalidatedNoInclude invalidated decisions (default: false)
limitNoMax results (default: 50)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the query/filtering behavior and the type of data returned ('decisions linked to code'), but doesn't mention important aspects like whether this is a read-only operation, potential rate limits, authentication requirements, pagination details (beyond the limit parameter), or error conditions. The description adds value but leaves gaps in behavioral context.

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 efficiently structured in three sentences that each serve distinct purposes: stating the core functionality, explaining the return value with a concrete example, and providing specific guidance on service_name filtering. There's no wasted text, and the most important information is front-loaded.

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?

Given the complexity (9 parameters, no annotations, no output schema), the description does a good job of explaining what the tool does and why to use it. The concrete example ('why was this architecture chosen?') helps contextualize the tool's value. However, without an output schema, the description could better explain the structure of returned decision records, though the example provides some indication.

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 all 9 parameters thoroughly. The description mentions filtering by 'type, subproject, code symbol, file path, tag, or time' which maps to parameters, and specifically calls out service_name for subproject filtering. However, it doesn't add significant meaning beyond what the schema provides, such as explaining relationships between parameters or providing usage examples.

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 clearly states the tool's purpose with specific verbs ('query', 'filter', 'returns') and resources ('decision knowledge graph', 'decisions linked to code'). It distinguishes from siblings by focusing on querying decisions rather than adding (add_decision) or invalidating (invalidate_decision) them, and provides a concrete example of what it answers ('why was this architecture chosen?').

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Query the decision knowledge graph... answered with the actual decision record') and mentions filtering by service_name for subproject-specific queries. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the many sibling tools, though the purpose naturally distinguishes it from non-decision-related tools.

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/nikolai-vysotskyi/trace-mcp'

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