Skip to main content
Glama

apply_structure

Add parent → child relations between names. Idempotent: existing links stay; new ones are added. With createMissing=true (default) names are auto-created if not found. Returns: applied, alreadyLinked, namesCreated (the names that didn't exist before), namesResolved (every child in input order with its resolved id — use to chain into edit_name_attributes).

═══ PROVENANCE — required on every write ═══ source: origin reference (file/URL/document/short note). Lands in the audit trail. agent: your AI agent name (e.g. "Claude"). Lands in the audit trail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentYesAI agent name (e.g. "Claude"). REQUIRED.
sourceYesOrigin reference — file, URL, document, or short note. REQUIRED.
databaseYesDatabase name
relationsYesNon-empty array of {parent, child} pairs
createMissingNoAuto-create names that don't exist (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations present, the description carries the full behavioral burden and does so well: it declares idempotency ('existing links stay; new ones are added'), the default auto-creation behavior, and enumerates every return field (applied, alreadyLinked, namesCreated, namesResolved) with the ordering of the resolved ids. It also flags the required provenance fields as landing in the audit trail.

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?

Front-loaded with the core action, followed by idempotency, then returns, all clearly sectioned with a header for provenance. It is efficient overall, though the returns sentence is dense and the provenance block partially restates the schema.

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 write tool with no annotations and no output schema, the description supplies exactly what is otherwise missing: mutation semantics, idempotency, default behavior, full return-value explanation, and required provenance. Nothing an agent needs to invoke it correctly is absent.

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%, so the baseline is 3, but the description adds real semantic value on top of it: it spells out the createMissing default, explains that source/agent feed the audit trail, and clarifies the chaining role of resolved ids. The only gap is a lack of detail on how invalid or cyclic relations are handled.

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?

States a specific verb and resource ('Add parent → child relations between names'), which is unambiguous and distinguishable from write siblings like edit_name_attributes or create_database. It even names edit_name_attributes as the natural chaining target, orienting the agent within the tool graph.

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

Usage Guidelines3/5

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

The idempotency rule and createMissing default give useful context, and the chaining hint ('use to chain into edit_name_attributes') implies a workflow. However, there is no explicit when-to-use vs. when-not guidance and no named alternative for callers who want different structural edits, so usage is only implied.

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