Skip to main content
Glama

Get risk

get_rsk

Read and parse a risk document by ID, returning frontmatter and body, or raw body text with offset/limit windowing.

Instructions

Read, parse, and return a full risk 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; its error text is byte-identical to the domain's own list tool's failed-row error for the same file (identical field path and cause, including the trailing pydantic documentation line; ADR 9080b37c-82b3-4f63-81f1-79641d0bf14c). 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_rsk -- strip the "<n>: " prefix from each line first (it is likewise never a valid edit old_str).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
rawNo
limitNo
offsetNo
numberedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so unusually well: parse failures return a ParseFailureResult (with error/path/id fields) rather than raising, its error text is byte-identical to list's failed-row error, invalid ids raise ValueError before any file access, out-of-range offset clamps to empty string, and offset/limit/numbered combined with raw=False raise ValueError. These are exactly the failure-mode and constraint disclosures an agent needs.

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 purpose is front-loaded in sentence one and every clause is substantive, but the heavy em-dash/parenthetical nesting (e.g. the ADR reference and the nested numbered-output warning) makes it dense to parse. It is long yet largely justified by the tool's genuine complexity.

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 5-parameter read tool with a full output schema, the definition covers the input contract, error paths, clamping, and cross-tool interactions (update, create_rsk, edit) completely. Nothing an agent needs to invoke it correctly 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 coverage is 0%, so the description must define all five parameters, and it does: raw toggles frontmatter stripping, offset is 1-based with default 1, limit defaults through end of body, numbered prefixes '<n>: ' with non-restarting absolute numbers. The only gap is that `id`'s expected format is left as 'wrong format' without a concrete example.

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 states a precise verb+resource+scope: 'Read, parse, and return a full risk document (frontmatter and body) by its id.' This clearly separates it from siblings like get_rsk_template (template), list_rsk (enumeration), parse_rsk (validation) and create_rsk (mutation).

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 gives explicit conditions for each mode: use raw=True for the frontmatter-stripped body, offset/limit only make sense with raw=True, numbered only with raw=True. It even explains how numbered output round-trips into the generic `update` tool. However, it never names an alternative tool for the non-raw case (e.g. parse_rsk for validation or get_rsk_template for the skeleton), so sibling routing is implied rather than stated.

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