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', }); }

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