Skip to main content
Glama

project_remove_document

Remove a document from a project while keeping its parts; the project excludes it so sync will not re-add it, and adding the part again restores 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. It also accepts a document that the project file does not name yet, but that project_sync would add (a "new reference" of project_status): use it to stop the sync of a document that the store links to a part. The copy is deleted when no part uses it; a pinned file stays. The central store does not change.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document": "<document>"
    },
    "name": "project_remove_document"
  }
}

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, any of its names (TI or Texas Instruments: the store knows the names of one manufacturer). Necessary only when two parts have the same MPN. With a datasheet, the tool reads the manufacturer from it: a given name must be a name of the same manufacturer.
delete_pinnedNoTrue: also delete a pinned file (pinned = true: a file outside the subfolder of the layout of its part, or a file that project_update_part pinned).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • changedInput schema / properties / manufacturer / description
      Previous value: -"The manufacturer, any of its names (TI or Texas Instruments: the store knows the names of one manufacturer). Necessary only when two parts have the same MPN."New value: +"The manufacturer, any of its names (TI or Texas Instruments: the store knows the names of one manufacturer). Necessary only when two parts have the same MPN. With a datasheet, the tool reads the manufacturer from it: a given name must be a name of the same manufacturer."
  2. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / delete_pinned / description
      Previous value: -"True: also delete a file that the user put into the project folder (pinned = true)."New value: +"True: also delete a pinned file (pinned = true: a file outside the subfolder of the layout of its part, or a file that project_update_part pinned)."
  3. Changed1 schema field changedv0.2.0
    • changedInput schema / properties / manufacturer / description
      Previous value: -"The manufacturer, for example TI. Necessary only when two parts have the same MPN."New value: +"The manufacturer, any of its names (TI or Texas Instruments: the store knows the names of one manufacturer). Necessary only when two parts have the same MPN."
  4. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses the exclusion persistence ("the project remembers it (exclude)"), the file-deletion condition ("deleted when no part uses it"), the pinned-file exception and its override, and that the central store is unchanged. That is exactly the side-effect and scope information an agent needs before a mutation.

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?

The core action and its scope constraint are front-loaded in the first clause, and no sentence is filler. The prose is dense and slightly telegraphic ("parts stay", heavy semicolon use), but that density is carrying real behavioral content rather than padding.

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 6-parameter mutation tool with no annotations, the description covers side effects, reversibility, the pinned special case, an alternate use case, and cross-tool interactions. Return values are handled by the existing output schema, so nothing essential is missing.

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; the description lifts it by clarifying the default pinned behavior ("a pinned file stays") in prose, which explains the practical effect of delete_pinned=false. The mpn scoping and path resolution are left entirely to the schema.

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 ("Remove a document from the parts of the user project") and immediately bounds it — "the parts stay" — which separates it from project_remove_part. It also frames the inverse (project_add_part) and the interaction with project_sync, so an agent can place it precisely among siblings.

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?

Gives a genuine second use case with its trigger: a document the project file does not name yet but that project_sync would add, "use it to stop the sync of a document that the store links to a part." It names the undo path (project_add_part) and the affected tool (project_sync). It does not explicitly exclude project_remove_source, so the when-not boundary against that sibling is left to inference.

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