Skip to main content
Glama

quip_read_document

Read content from Quip documents using thread IDs to access and retrieve document information.

Instructions

Read the content of a Quip document by its thread ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdYesThe Quip document thread ID

Implementation Reference

  • The `readDocument` method contains the core execution logic for the `quip_read_document` tool. It runs a Python script (`quip_edit.py`) with the threadId and 'read' argument to fetch the document content.
    private async readDocument(threadId: string) { try { console.log(`Reading document ${threadId}...`); // Execute the Python script to read the document const command = `python -u ${path.join(SCRIPTS_DIR, 'quip_edit.py')} ${threadId} read`; const { stdout, stderr } = await execAsync(command); if (stderr) { console.error(`Error reading document: ${stderr}`); throw new Error(stderr); } return { content: [ { type: 'text', text: stdout || 'Document read successfully, but no content was returned', }, ], }; } catch (error) { console.error('Error reading document:', error); throw error; } }
  • The switch case in the CallToolRequestSchema handler that validates input and dispatches to the `readDocument` implementation.
    case 'quip_read_document': { const typedArgs = args as any; if (!typedArgs.threadId) { throw new McpError(ErrorCode.InvalidParams, 'threadId is required'); } return await this.readDocument(String(typedArgs.threadId)); }
  • src/index.ts:51-64 (registration)
    Tool registration in the ListToolsRequestSchema response, defining name, description, and input schema.
    { name: 'quip_read_document', description: 'Read the content of a Quip document by its thread ID', inputSchema: { type: 'object', properties: { threadId: { type: 'string', description: 'The Quip document thread ID' } }, required: ['threadId'], }, },
  • The input schema defining the required `threadId` parameter for the tool.
    inputSchema: { type: 'object', properties: { threadId: { type: 'string', description: 'The Quip document thread ID' } }, required: ['threadId'], },

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/AvinashBole/quip-mcp-server'

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