Skip to main content
Glama

yuque_get_doc

Retrieve detailed document content from Yuque knowledge bases using document and repository IDs for API integration and data access.

Instructions

获取文档详情 (Get document details)

Input Schema

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

Implementation Reference

  • The main handler function for the 'yuque_get_doc' tool. It extracts docId and repoId from arguments, calls YuqueClient.getDoc to fetch the document details, and returns the result as formatted JSON text content.
    async function handleGetDoc( client: YuqueClient, args: { docId: number; repoId: number } ) { const doc = await client.getDoc(args.docId, args.repoId); return { content: [ { type: 'text', text: JSON.stringify(doc, null, 2), }, ], }; }
  • The tool definition and input schema for 'yuque_get_doc', specifying required numeric parameters docId and repoId.
    { name: 'yuque_get_doc', description: '获取文档详情 (Get document details)', inputSchema: { type: 'object', properties: { docId: { type: 'number', description: '文档ID (Document ID)', }, repoId: { type: 'number', description: '知识库ID (Repository ID)', }, }, required: ['docId', 'repoId'], }, },
  • Registration of the 'yuque_get_doc' handler within the central tool dispatch switch statement in handleTool.
    case 'yuque_get_doc': return await handleGetDoc( client, args as { docId: number; repoId: number } );
  • src/server.ts:46-50 (registration)
    Registration for listing all tools, including 'yuque_get_doc', by returning the YUQUE_TOOLS array containing its definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: YUQUE_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