Skip to main content
Glama

flag_risks

Run heuristic risk rules on a loaded contract to detect issues like uncapped liability or auto-renewal, returning flagged risks with severity and supporting evidence.

Instructions

Run heuristic risk rules against a loaded contract (e.g. uncapped liability, auto-renewal without notice, one-sided termination) and return the flags with severity and supporting evidence.

Args: doc_id: doc_id returned by load_contract.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does reasonably well: it discloses that this runs heuristic rules, names representative rule categories, and states that it returns flags with severity and evidence. It does not mention side effects, but the operation is clearly a read-style analysis and no destructive behavior is implied.

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?

Every part earns its place: a one-sentence functional summary with illustrative examples, followed by a single argument description. The information is front-loaded and free of filler.

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?

The tool is simple (one required parameter) and the description covers the input source, the operation, and the return content. Since there is no output schema, the description's mention of flags with severity and supporting evidence is adequate; details of the exact response format are not critical for invoking the tool.

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 0%, so the description must document the parameter, and it does: 'doc_id: doc_id returned by load_contract.' This adds provenance semantics beyond the schema's bare string type, telling the agent the ID must come from a prior load_contract call.

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 opens with a specific verb+resource: 'Run heuristic risk rules against a loaded contract' and names concrete example rules, so an agent can distinguish risk flagging from sibling tools like extract_clauses or summarize_contract. It also states what is returned (flags with severity and supporting evidence), making the tool's purpose unambiguous.

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 clear context: the tool acts on a loaded contract and takes the doc_id returned by load_contract, so invocation sequencing is obvious. It does not explicitly list when-not-to-use or compare with sibling tools, but the prerequisite is stated clearly enough for correct selection.

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