Skip to main content
Glama
megamaced

collectives-mcp

by megamaced

restore_attachment

Idempotent

Restore a deleted attachment to its page using the attachment's numeric ID. Provide the collective ID, page ID, and attachment ID to complete the recovery.

Instructions

Restore a deleted attachment from the page's attachment trash. Takes the numeric attachment id — a trashed attachment no longer appears in list_attachments, so there is no name to look up. delete_attachment returns the id you need.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYes
attachmentIdYesAttachment id, as returned by delete_attachment.
collectiveIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=true. The description adds behavioral context by explaining the trash mechanics (no longer in list_attachments) and the id source, which is beyond the annotations. No contradiction found.

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?

Two sentences, no fluff. The primary purpose is stated first, followed by a necessary clarification about id sourcing. Every sentence earns its place.

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?

For a simple restore tool with three required params and no output schema, the description covers the critical nuance (id not name) and the prerequisite (delete_attachment). It omits explicit return value and error handling, but given the annotations covering idempotency and non-destructiveness, the description is adequately complete.

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

Parameters3/5

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

Schema coverage is only 33% (attachmentId has a description). The description adds meaning for attachmentId by explaining it is numeric and returned by delete_attachment, but it does not clarify collectiveId or pageId, leaving those to be inferred from naming and sibling context. It partially compensates for the low coverage but not fully.

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 precise verb and resource: 'Restore a deleted attachment from the page's attachment trash.' It clearly distinguishes from restore_page and restore_trashed_collective by specifying 'attachment.' The reference to list_attachments and delete_attachment further anchors its scope.

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 implicitly defines when to use: when a deleted attachment needs restoring, and it explains that a trashed attachment has no name, so the id from delete_attachment is required. It does not explicitly list exclusions or name alternative tools, but the context is clear enough for an agent to select this over related restore tools.

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