Skip to main content
Glama

Upsert dossier document

upsert_dossier_document
Idempotent

Create or replace one document in a dossier's Mappe. Identify the document by document_id, or by playbook_item_key within the dossier; without either, a new document is created. kind says what role it plays (analysis, concept, calculation, form_content, gaps, reference_list, other). Set is_internal for anything a share link must not show — calculations and gap lists.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "upsert_dossier_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo
titleNo
contentNoMarkdown. ```mermaid fences render as diagrams.
grant_idNo
tender_idNo
dossier_idNo
sort_orderNo
document_idNo
is_internalNo
playbook_item_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false, and readOnlyHint=false, so the description's job is to add context — and it does: replacement semantics mean existing content is overwritten, and is_internal is flagged as a share-link visibility control with examples ('calculations and gap lists'), which is security-relevant behavior not present in the annotations. It omits any note on concurrency or what the response contains, but the safety profile is well covered.

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?

Three sentences, front-loaded with the core action, with no filler. The final em-dash clause is slightly dense but conveys the security caveat efficiently, so the only cost is a mildly packed second half.

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

Completeness3/5

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

Reasonable for the identity and privacy logic, but with 10 parameters, zero required fields, no output schema, and 10% schema coverage, an agent still cannot infer how dossier_id, grant_id, and tender_id scope the write or what happens when several are supplied. The definition is adequate but leaves a consequential ambiguity for a mutation tool.

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 only 10% across 10 parameters, so the description has to compensate and only partly does: it explains document_id, playbook_item_key, kind's enum roles, and is_internal's intent. The scoping parameters (dossier_id, grant_id, tender_id) and sort_order/title are left entirely to an undocumented schema, which is a real gap for a tool with no required parameters.

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 pair ('create or replace') and a precisely scoped resource ('one document in a dossier's Mappe'), which cleanly separates it from read/delete siblings like get_dossier_document and delete_dossier_document. It even disambiguates itself from upsert_dossier by scoping to a single document.

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 concrete selection rule for the two identity modes: use document_id, or playbook_item_key within the dossier, and states the fallback (no key = new document is created). It does not name alternatives for other cases (e.g. delete_dossier_document for removal, create_draft_document for drafts), so it falls short of full when/when-not guidance.

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