Skip to main content
Glama

get_why

Reveal why code is shaped the way it is by retrieving decision records and evidence commits, clarifying rationale before refactors or pattern changes.

Instructions

Why this code is shaped this way — decision records + evidence commits.

Call before refactors or pattern divergences. Query modes: a question
("why is auth using JWT?"), a file path (governing decisions + origin
story + alignment score), a question anchored to targets, or no query
(decision health dashboard). Falls back to git archaeology when no
decisions exist for a path — never empty. Evidence-bearing rows carry an
explicit ``provenance`` and self-contained ``evidence_refs``; matching ids
mean shared evidence, not independent corroboration. ``answer_basis`` names
the strongest lane the response rests on (decision, episode, rationale,
archaeology, documentation); only a decision is a ruling, the rest are
evidence to weigh.

Args:
    query: question, file/module path, or omit for the dashboard.
    targets: optional file paths to anchor the search, or to ask about on
        their own when there is no query.
    repo: usually omitted.
    id: decision or ``ev_...`` evidence id emitted by this or another tool.
    reference: structured evidence reference. Its id and repository are
        accepted together without caller translation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
repoNo
queryNo
targetsNo
referenceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral disclosure burden. It reveals key behaviors: fallback to git archaeology when no decisions exist, never-empty results, provenance/evidence_refs semantics, shared evidence meaning, and the answer_basis lane distinction. This is substantially more transparent than typical tool descriptions.

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 description is dense but every sentence earns its place, covering purpose, usage timing, query modes, behavioral semantics, and arguments. The backtick-wrapped terms add mild noise, but the structure is logical and front-loaded with the core purpose.

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 tool with five parameters, no annotations, and complex multimodal behavior, the description is remarkably complete. It explains all query modes, fallback behavior, result semantics, and parameter roles. The output schema exists, so not detailing the exact response format is acceptable; the agent has enough information to invoke and interpret results.

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 description coverage is 0%, so the description must compensate. It documents all five parameters (query, targets, repo, id, reference) with functional meaning and even notes caller conveniences like accepting id and repository together. Some entries are terse (e.g., "repo: usually omitted"), but overall the parameter semantics are well covered.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool explains code decisions and evidence ("Why this code is shaped this way — decision records + evidence commits") and enumerates concrete query modes. It does not explicitly differentiate from siblings like get_answer or get_context, but its purpose is specific and not confusable after reading.

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 gives an explicit trigger condition ("Call before refactors or pattern divergences") and describes all invocation modes. It does not name alternative sibling tools or state when not to use it, but the usage context is clear enough for an agent to decide.

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

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/repowise-dev/repowise'

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