Skip to main content
Glama

Replace Document With Markdown

replace_doc_with_markdown

Replace the main note content of an AFFiNE document with specified markdown input. Use this to update document content programmatically.

Instructions

Replace the main note content of a document with markdown content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYesAFFiNE document id.
strictNo
markdownYesMarkdown content to replace with
workspaceIdNoAFFiNE workspace id. Omit only when AFFINE_WORKSPACE_ID is configured.
Behavior3/5

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

Annotations indicate the tool is not read-only, not idempotent, and not destructive, which aligns with the 'replace' action. The description adds no details beyond that, such as whether other document attributes are preserved or the fate of old content.

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?

The description is a single, concise sentence that is front-loaded with the action and resource. No unnecessary words or information.

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?

The tool has four parameters and no output schema. The description explains the basic function but does not address error conditions, prerequisites (e.g., existing document), or confirm the absence of return values beyond what a replacement implies.

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 75%, covering three of four parameters. The description does not add any parameter-specific information beyond what is in the schema, and the 'strict' parameter lacks documentation in both.

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 clearly states the tool replaces the main note content of a document with markdown, using a specific verb and resource. It differentiates from siblings like append_markdown and create_doc_from_markdown by specifying replacement rather than addition or creation.

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

Usage Guidelines3/5

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

The description implies that the tool is used when one wants to overwrite a document's content entirely, but it does not provide explicit guidance on when to use this over alternatives, nor does it mention any prerequisites or exclusions.

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/DAWNCR0W/affine-mcp-server'

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