Skip to main content
Glama

yuque_delete_doc

Remove documents from the Yuque knowledge base platform by specifying document and repository IDs for content management.

Instructions

删除文档 (Delete document)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docIdYes文档ID (Document ID)
repoIdYes知识库ID (Repository ID)

Implementation Reference

  • The main handler function that executes the yuque_delete_doc tool logic by calling the YuqueClient.deleteDoc method and returning a bilingual success message.
    async function handleDeleteDoc(
      client: YuqueClient,
      args: { docId: number; repoId: number }
    ) {
      await client.deleteDoc(args.docId, args.repoId);
      return {
        content: [
          {
            type: 'text',
            text: '文档删除成功 (Document deleted successfully)',
          },
        ],
      };
    }
  • The input schema definition for the yuque_delete_doc tool, requiring docId and repoId as numeric parameters.
    {
      name: 'yuque_delete_doc',
      description: '删除文档 (Delete document)',
      inputSchema: {
        type: 'object',
        properties: {
          docId: {
            type: 'number',
            description: '文档ID (Document ID)',
          },
          repoId: {
            type: 'number',
            description: '知识库ID (Repository ID)',
          },
        },
        required: ['docId', 'repoId'],
      },
    },
  • Switch case in the main handleTool function that registers and routes yuque_delete_doc calls to its handler.
    case 'yuque_delete_doc':
      return await handleDeleteDoc(
        client,
        args as { docId: number; repoId: number }
      );
  • src/server.ts:46-50 (registration)
    MCP server registration for listing tools, which includes the yuque_delete_doc tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: YUQUE_TOOLS,
      };
    });
  • Supporting YuqueClient method that performs the actual Yuque API DELETE request for the document.
    async deleteDoc(docId: number, repoId: number): Promise<void> {
      await this.request(`/repos/${repoId}/docs/${docId}`, {
        method: 'DELETE',
      });
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action is deletion but doesn't specify whether this is permanent or reversible, what permissions are required, if there are rate limits, or what happens to associated data. For a destructive operation with zero annotation coverage, this lack of detail is a significant gap.

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 extremely concise—just two words in Chinese and English—with zero wasted text. It is front-loaded with the core action ('删除文档'/'Delete document'), making it easy to scan. Every word earns its place by directly conveying the tool's purpose.

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

Completeness2/5

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

Given this is a destructive tool with no annotations and no output schema, the description is incomplete. It doesn't address critical context like the permanence of deletion, error handling, or response format. For a tool that performs deletion, more information is needed to ensure safe and correct usage by an AI agent.

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 both parameters (docId and repoId) clearly documented in the schema. The description adds no additional meaning beyond what the schema provides, such as explaining how to obtain these IDs or their format. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('删除文档'/'Delete document') and identifies the resource being acted upon (a document). It distinguishes itself from sibling tools like yuque_get_doc or yuque_update_doc by specifying deletion. However, it doesn't explicitly mention the platform (Yuque) or provide additional context about what deletion entails beyond the basic verb.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a valid docId and repoId), when not to use it (e.g., for temporary removal vs. permanent deletion), or direct alternatives among siblings like yuque_update_doc for modifying instead of deleting. Usage is implied only by the tool name and description.

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/tanis2010/yuque-mcp-server'

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