Skip to main content
Glama

Delete Document

delete_doc
Destructive

Permanently delete an AFFiNE document after confirmation, reporting workspace-metadata and content deletion separately. Requires matching docId and confirmDocId to ensure intent.

Instructions

Delete a document, wait for the AFFiNE WebSocket outcome, and report workspace-metadata and content deletion separately. This is destructive; use revoke_doc when you only need to remove public access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYesAFFiNE document id.
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.
confirmDocIdYesMust exactly match docId to confirm permanent document deletion.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
codeNo
kindNo
docIdNo
errorNo
deletedNo
detailsNo
retryableNo
workspaceIdNo
Behavior4/5

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

Annotations already declare destructiveHint: true, readOnlyHint: false, and idempotentHint: false. The description adds behavioral context beyond annotations by mentioning the WebSocket wait and separate reporting of workspace-metadata and content deletion. No contradiction exists; it enriches safety understanding.

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, each earning its place: the first states the action and outcome granularity, the second provides a critical safety warning and alternative. No redundancy or filler.

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?

Given the tool's destructive nature, the description covers the key decision point (when to use vs. revoke_doc), the operation's outcome reporting, and the schema fully documents all parameters. With annotations and an output schema present, nothing critical is missing.

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%, with each parameter (docId, workspaceId, confirmDocId) already documented in the input schema. The description does not add parameter-level details, but the schema carries the burden effectively, so a baseline of 3 is appropriate.

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 specifies a clear action ('Delete a document'), the resource, and a unique behavioral detail (waiting for WebSocket outcome and reporting workspace-metadata vs content deletion separately). It explicitly distinguishes itself from revoke_doc, a sibling that removes public access only.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use the tool vs. an alternative: 'use revoke_doc when you only need to remove public access.' This is a direct usage directive with a named alternative, leaving no ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/irfanhak123/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server