Skip to main content
Glama

quip_prepend_content

Add content to the beginning of an existing Quip document by specifying the thread ID and markdown content to prepend.

Instructions

Add content to the beginning of an existing Quip document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdYesThe Quip document thread ID
contentYesMarkdown content to prepend to the document

Implementation Reference

  • Switch case handler for the quip_prepend_content tool. Validates input parameters and delegates to the shared editDocument method with 'PREPEND' operation.
    case 'quip_prepend_content': {
      const typedArgs = args as any;
      if (!typedArgs.threadId || !typedArgs.content) {
        throw new McpError(ErrorCode.InvalidParams, 'threadId and content are required');
      }
      return await this.editDocument(String(typedArgs.threadId), String(typedArgs.content), 'PREPEND');
    }
  • src/index.ts:83-100 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    {
      name: 'quip_prepend_content',
      description: 'Add content to the beginning of an existing Quip document',
      inputSchema: {
        type: 'object',
        properties: {
          threadId: {
            type: 'string',
            description: 'The Quip document thread ID'
          },
          content: {
            type: 'string',
            description: 'Markdown content to prepend to the document'
          }
        },
        required: ['threadId', 'content'],
      },
    },
  • Helper function that implements the core logic for editing (including prepending) Quip documents by invoking the external Python script quip_edit.py with the appropriate operation.
    private async editDocument(threadId: string, content: string, operation: string) {
      try {
        console.log(`Editing document ${threadId} with operation ${operation}...`);
        
        // Create a temporary file to store the content
        const tempFilePath = `/tmp/quip_content_${Date.now()}.md`;
        const writeCommand = `echo "${content.replace(/"/g, '\\"')}" > ${tempFilePath}`;
        await execAsync(writeCommand);
        
        // Execute the Python script to edit the document
        const command = `python -u ${path.join(SCRIPTS_DIR, 'quip_edit.py')} ${threadId} ${operation.toLowerCase()} ${tempFilePath}`;
        const { stdout, stderr } = await execAsync(command);
        
        // Clean up the temporary file
        await execAsync(`rm ${tempFilePath}`);
        
        if (stderr) {
          console.error(`Error editing document: ${stderr}`);
          throw new Error(stderr);
        }
    
        return {
          content: [
            {
              type: 'text',
              text: stdout || `Successfully ${operation.toLowerCase()}ed content to document ${threadId}`,
            },
          ],
        };
      } catch (error) {
        console.error(`Error ${operation.toLowerCase()}ing document:`, error);
        throw error;
      }
    }
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 tool 'Add[s] content' (implying a write/mutation operation) but does not disclose permissions required, rate limits, whether changes are reversible, or what the response looks like. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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, efficient sentence that front-loads the core action and resource without any wasted words. It is appropriately sized for the tool's complexity and gets straight to the point.

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?

Given the tool's moderate complexity (a mutation operation with 2 parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavioral aspects like permissions or response format, which are important for a write tool. It meets the minimum viable standard but has clear gaps.

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?

The schema description coverage is 100%, with clear descriptions for both parameters (threadId and content). The description does not add any additional meaning or context beyond what the schema provides, such as format details or examples. With high schema coverage, the baseline score of 3 is appropriate.

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 specific action ('Add content to the beginning') and target resource ('an existing Quip document'), using precise language that distinguishes it from sibling tools like quip_append_content (which adds to the end) and quip_replace_content (which replaces content).

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

Usage Guidelines4/5

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

The description implies usage context by specifying 'an existing Quip document,' which suggests this tool is not for creating new documents (use quip_create_document) or reading documents (use quip_read_document). However, it does not explicitly state when not to use it or name alternatives, leaving some ambiguity compared to explicit guidance.

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

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