Skip to main content
Glama

get_why

Read-only

Retrieve decision records and evidence commits explaining why code is shaped a certain way, so you can check the rules in force before refactoring or diverging from a pattern.

Instructions

Why this code is shaped this way: decision records and evidence commits.

Call before a refactor or pattern divergence. A path gets the rules in force first, then labelled background records. authority: accepted means somebody signed the decision; answer_basis names the strongest evidence lane, and only decision is a ruling.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_why"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoDecision or `ev_...` evidence id from any tool.
repoNoUsually omitted.
queryNoA question, a file or module path, or omit for the decision dashboard.
includeNo["history"]: a path's origin story, commits, episodes.
targetsNoFile paths to anchor a question.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed19 schema fields changedv0.62.0
    • removedInput schema / properties / id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / id / description
      Added value: +"Decision or `ev_...` evidence id from any tool."
    • addedInput schema / properties / id / type
      Added value: +"string"
    • removedInput schema / properties / include / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / include / description
      Added value: +"[\"history\"]: a path's origin story, commits, episodes."
    • addedInput schema / properties / include / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / include / type
      Added value: +"array"
    • removedInput schema / properties / query / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / query / description
      Added value: +"A question, a file or module path, or omit for the decision dashboard."
    • addedInput schema / properties / query / type
      Added value: +"string"
    • removedInput schema / properties / reference
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • removedInput schema / properties / repo / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / repo / description
      Added value: +"Usually omitted."
    • addedInput schema / properties / repo / type
      Added value: +"string"
    • removedInput schema / properties / targets / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / targets / description
      Added value: +"File paths to anchor a question."
    • addedInput schema / properties / targets / items
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / targets / type
      Added value: +"array"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "additionalProperties": true,
      -      "title": "Result",
      -      "type": "object"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "get_whyOutput",
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changedv0.61.0
    • addedInput schema / properties / include
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  3. Changed11 schema fields changedv0.60.1
    • removedInput schema / properties / id / default
      Removed value: -null
    • removedInput schema / properties / id / title
      Removed value: -"Id"
    • removedInput schema / properties / query / default
      Removed value: -null
    • removedInput schema / properties / query / title
      Removed value: -"Query"
    • removedInput schema / properties / reference / default
      Removed value: -null
    • removedInput schema / properties / reference / title
      Removed value: -"Reference"
    • removedInput schema / properties / repo / default
      Removed value: -null
    • removedInput schema / properties / repo / title
      Removed value: -"Repo"
    • removedInput schema / properties / targets / default
      Removed value: -null
    • removedInput schema / properties / targets / title
      Removed value: -"Targets"
    • removedInput schema / title
      Removed value: -"get_whyArguments"
  4. Changed2 schema fields changedv0.48.0
    • addedInput schema / properties / id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Id"
      +}
    • addedInput schema / properties / reference
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Reference"
      +}
  5. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description does add real behavioral context beyond that: the ordering of results (rules in force first, then labelled background records) and the meaning of the `authority`, `answer_basis`, and `decision` fields, which matters because no output schema exists. However, it never states coverage limits, latency, or whether the record set is exhaustive.

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?

Purpose is front-loaded in the first clause, followed by the trigger and then result interpretation — a sensible ordering with little waste. The backtick-heavy field shorthand is dense but each sentence carries information.

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?

For a five-parameter, no-required-argument read tool with no output schema, the description covers the use case, result ordering, and the key fields an agent must interpret. It is only incomplete about how the optional parameters combine and whether results are paginated or truncated.

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 100%, so every parameter is already documented in the schema, including the dashboard default when `query` is omitted. The description adds only an indirect hint that a path yields in-force rules first; it does not clarify how `include: ["history"]` or `targets` interact with `query`, so baseline 3 is right.

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 opening sentence gives a specific verb-and-resource framing: it retrieves decision records and evidence commits explaining why code is shaped as it is. That clearly separates a rationale lookup from a plain code search or symbol lookup, though it does not name a sibling tool to contrast against.

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?

"Call before a refactor or pattern divergence" gives a concrete trigger condition that an agent can act on. What is missing is any exclusion or routing rule — nothing says when to prefer get_context or get_answer instead — so it stops short of full when/when-not guidance.

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