Skip to main content
Glama

project_remove_document

Remove a document from a user project while keeping its parts and exclude it so project sync does not add it again; delete the local copy only when no part uses it.

Instructions

Remove a document from the parts of the user project; the parts stay. The project remembers it (exclude), so that project_sync does not add it again; project_add_part with this document adds it again. The copy is deleted when no part uses it. The central store does not change.

Input Schema

NameRequiredDescriptionDefault
mpnNoOnly from this part. Empty: from each part that has it.
pathNoA folder of the user project (default: the working folder of the server). The project file datasheet-lens.toml is in it or in a parent folder.
dry_runNoTrue: change nothing, only tell what would change.
documentYesThe document: its reference, a SHA-256 prefix, its document ID, or its file name in the project folder.
manufacturerNoThe manufacturer, for example TI. Necessary only when two parts have the same MPN.
delete_pinnedNoTrue: also delete a file that the user put into the project folder (pinned = true).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations the description carries the full burden and mostly succeeds: it discloses the persistent exclusion that stops project_sync re-adding, that the local copy is deleted only when no part uses it, and that the central store is unaffected. It does not state permission requirements or whether the deletion is recoverable for the underlying file, which matters for a destructive operation.

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?

Four short sentences, each carrying distinct information, with the core scope stated first and lifecycle effects after. No filler; the telegraphic '(exclude)' phrasing is terse but still parseable.

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?

Output schema exists, so return values need not be described, and all six parameters are schema-documented. What remains thin is the guidance for a destructive mutation with no annotations — no note on permissions or irreversibility of the underlying file deletion when delete_pinned is true.

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 description coverage is 100%, so mpn, path, dry_run, manufacturer and delete_pinned are already fully documented; baseline is 3. The description adds only indirect meaning to 'document' via the re-add note, and says nothing extra about dry_run or the pinned-file interaction.

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?

Precise verb+resource ('Remove a document from the parts of the user project') with an immediate scope clarifier ('the parts stay') that separates it from the sibling project_remove_part. An agent can pick between the two without opening either schema.

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?

It gives clear context and names the reversal path ('project_add_part with this document adds it again') plus the sync interaction, so the agent knows what this tool is for and how to undo it. It stops short of an explicit when-not-to-use rule or a direct comparison to project_remove_part beyond the 'parts stay' clause.

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