Skip to main content
Glama

why_code

Retrieve the rationale behind any function or file before rewriting it, preserving past decisions and avoiding blind changes.

Instructions

WHAT/WHY/WHY-THIS-WAY/GOTCHA card for a function or file. Call before rewriting existing code so past decisions aren't undone blindly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
symbolNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It communicates an informational purpose and implies a safe read-only operation, but it does not explicitly state that it has no side effects, what happens when no card exists, or any permission requirements.

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 a single front-loaded sentence that wastes no words. It packs the tool's purpose, output type, and usage timing into a compact, readable form.

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 only two parameters, an output schema, and a clear usage directive, the description is largely complete for invocation. The main gap is not explaining how it differs from closely related siblings like get_related_decisions, but that is not required for a correct call.

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 0%, so the description must compensate. 'Function or file' loosely maps to the `file` and optional `symbol` parameters, but the description never explicitly connects those concepts to the parameter names or explains the optional/nullable behavior of `symbol`.

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 identifies the tool as a 'WHAT/WHY/WHY-THIS-WAY/GOTCHA card' for a function or file, with the explicit purpose of surfacing past decisions before rewriting. This distinguishes it from sibling retrieval tools like read_memory or get_project_overview by anchoring it to code-specific rationale.

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?

It explicitly states when to call: 'before rewriting existing code.' It does not list exclusions or name alternative sibling tools, but the when-to-use guidance is clear and actionable.

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

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/sirajjunior540/product-memory-oss'

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