Skip to main content
Glama

aa_upsert_diagram

Idempotent

Add or update a diagram in the working report and validate its structure immediately to catch errors before publishing.

Instructions

Add or update a diagram in the working report with immediate structural validation.

Input Schema

NameRequiredDescriptionDefault
idYes
kindYes
edgesYes
nodesYes
titleYes
freshnessNo
workspaceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so 'add or update' largely restates them; the real added value is 'immediate structural validation', which tells the agent invalid diagrams are rejected at write time. It does not say what a validation failure looks like, whether a failing upsert leaves the prior diagram intact, or whether the id keys a replace operation.

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?

A single front-loaded sentence with no filler and no redundancy. It is efficient, though the brevity is a symptom of under-specification rather than tight writing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a mutating tool with 6 required parameters, nested node/edge structures with claim references, and no output schema, yet the description is one sentence. An agent gets no guidance on the node/edge/claims model, the 12-node cap, or how 'freshness' should be set, so it cannot call this correctly from the description alone.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters, so the description carries the burden of explaining them and adds nothing. It never explains what 'kind' selects, what 'freshness' means for a diagram, that 'id' is the upsert key, or what the per-node/edge 'claims' references point at.

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?

States a specific verb pair ('Add or update') and resource ('a diagram in the working report'), which is enough to tell it apart from aa_upsert_claim and aa_upsert_section by artifact type. It does not explicitly name those siblings as alternatives, so it stops short of a 5.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance, and no reference to the sibling tools that write other report artifacts. The only hint about context is 'in the working report', which implies a pre-finish/render stage but leaves the sequencing to inference.

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