Skip to main content
Glama

Get the concrete remediation playbook for a flagged finding

get_remediation_playbook
Read-only

Maps a finding's rule value from analyze_install_script, check_maintainer_changes, or check_package_provenance to the matching human-authored incident-response playbook (the same content published at /docs/playbooks) and returns its concrete, ordered steps, severity tier, real-incident references, and prevention tips — not just a link. Pass the exact rule string(s) a prior finding already returned (batch up to 10 in one call to cover a whole findings array; duplicates resolving to the same playbook are deduplicated) or an id to look up a specific playbook by slug directly. Each matched rule also gets its own short situationNote explaining specifically what that rule caught — so a batch of several different rules landing on the same playbook does not read as identical, repeated boilerplate. An unrecognized rule or id is not an error — it comes back with matched:false and a note, since a low-severity or baseline-only finding (e.g. analyze_install_script's lifecycle-present) legitimately has no dedicated playbook.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoA playbook slug to look up directly, e.g. "postinstall-binary" — see /docs/playbooks
rulesNo1-10 exact `rule` values copied from findings already returned by analyze_install_script/check_maintainer_changes/check_package_provenance

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesYes
playbooksYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is clear. The description adds valuable behavioral context: batching with deduplication, situationNote per rule to avoid repeated boilerplate, and the matched:false behavior for unrecognized inputs. It also discloses that the content matches /docs/playbooks, giving the agent a confidence anchor.

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 long but every sentence earns its place: it explains the mapping, the return payload, batching, deduplication, situationNote behavior, and error semantics. It is front-loaded with the core purpose and then layers in usage details. No filler or repetition of schema fields.

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 2 optional params and no required params, the description is remarkably complete. It covers input source, batching limits, deduplication, per-rule output nuance, unmatched behavior, and references the published playbook location. The output schema exists, so return values don't need to be spelled out.

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 coverage is 100% and the schema descriptions already explain both id and rules well. The description adds meaning by explaining how the two parameters relate (id for direct slug lookup, rules for batch lookup from findings), and clarifies that duplicates resolving to the same playbook are deduplicated. This goes beyond the schema's basic field descriptions.

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 precisely identifies the tool's function: it maps rule values from specific sibling analysis tools to human-authored playbooks and returns ordered steps, severity tier, references, and prevention tips. It clearly distinguishes itself from siblings like prioritize_remediation and query_vulnerabilities by saying it returns actual playbook content, not just a link.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use this tool: after a finding from analyze_install_script, check_maintainer_changes, or check_package_provenance, and how to batch up to 10 rules. It also explains what is not an error (unrecognized rule/id returns matched:false) and gives a concrete example of an id lookup. Alternatives are implicitly covered by naming the exact source tools, and the description clarifies the 'not just a link' distinction.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources