Skip to main content
Glama

Get feature

get_feat

Read and fully parse a feature document by id, returning frontmatter and body; use raw=True to retrieve the body text verbatim, optionally windowed by offset/limit or line-numbered.

Instructions

Read, parse, and return a full feature document (frontmatter and body) by its id. Pass raw=True to return the frontmatter-stripped body text verbatim instead. With raw=True, optional read-style offset/limit window the raw read: offset (1-based, default 1) is the first body line to return, limit (line count, default through end of body) how many; out-of-range values clamp (offset > N returns the empty string), and coordinates with raw=False raise ValueError. A document that exists but fails to parse returns a ParseFailureResult (error/path/id) instead of raising; get_feat always fully parses, so its error text is the full-fidelity authority for this document -- byte-identical to list_feat's own failed-row error for the same file once list_feat's background warmup (or this very call) has fully parsed it; before that (or under SPECMGR_FEAT_WARMUP_DISABLED), list_feat's row may carry a transiently-healthy or dirty-stage-specific error instead (ADR 3982712a-a46b-4b2b-809f-9c6925a49b44, time-qualifying ADR 9080b37c-82b3-4f63-81f1-79641d0bf14c for feat only; every other domain's list/get error byte-identity stays unconditional). An invalid id (path-injection attempt or wrong format) is also a ValueError, raised before any file access. With raw=True, an optional numbered=True prefixes every returned body line with its 1-based absolute body-line number in the "<n>: " form (plain decimal, no padding) -- under offset/limit windowing the numbers start at the clamped offset and never restart at 1, so a number seen in the output can be fed straight back into the generic update tool's offset. numbered is meaningful only with raw=True: combining it with raw=False raises ValueError (like offset/limit), and a numbered read of a document that fails to parse returns the ParseFailureResult described above, never numbered text. Numbered output must never be fed back verbatim into content for update or create_feat -- strip the "<n>: " prefix from each line first (it is likewise never a valid edit old_str).

Input Schema

NameRequiredDescriptionDefault
idYes
rawNo
limitNo
offsetNo
numberedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.37.0
    • addedOutput schema / $defs / AcceptanceCriterionItem / pattern
      Added value: +"^\\[( |x|X)\\]\\s*(.*)$"
    • addedOutput schema / $defs / FeatFrontmatter / properties / status / enum
      Added value: +[
      +  "done",
      +  "planning",
      +  "progress",
      +  "review"
      +]
    • addedOutput schema / $defs / FeatTaskItem / pattern
      Added value: +"^\\[( |x|X)\\]\\s*(.*)$"
  2. First observedv0.36.0

TDQS

A4.6/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 burden and does so: parse failures return a ParseFailureResult instead of raising, invalid ids raise ValueError before file access, out-of-range offset/limit clamp, and incompatible flag combinations raise ValueError. It even discloses the warmup/caching nuance that affects error fidelity relative to list_feat, which is behavior no schema could convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical points are front-loaded, but the description is bloated with ADR identifiers and a long, self-referential digression on byte-identity with list_feat's error rows. That parity detail is tangential to calling this tool and inflates the middle of an otherwise efficient definition.

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 five-parameter read tool with an output schema, the description covers the mutation-adjacent edge cases an agent actually needs: failures return a structured result, flag conflicts raise, and numbered output is not round-trippable into write tools. Nothing essential to correct invocation is missing.

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

Parameters5/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 and it does: `raw` semantics, `offset` (1-based, default 1), `limit` (default through end of body), clamping behavior, and `numbered` (prefix format, numbering continues from clamped offset, only valid with raw=True). That is meaning well beyond the bare types and defaults in 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 first sentence gives a specific verb and resource: read, parse, and return a full feature document (frontmatter and body) by id. It immediately distinguishes the raw variant, so an agent knows exactly what it gets without opening the schema.

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 clearly explains the raw=True mode switch and warns against feeding numbered output back into `content` for `update`/`create_feat` or using it as `edit` `old_str`, which is actionable guidance. However, it never says when to prefer this tool over siblings such as `parse_feat`, `list_feat`, or `get_feat_example` for discovery, so the alternative-selection story is implicit.

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

Deploy Server

Other Tools