Skip to main content
Glama
jhliberty

Basecamp MCP Server

by jhliberty

create_document

Generate and store a document in a specific vault by providing the project ID, vault ID, title, and HTML content using the Basecamp MCP Server tool.

Instructions

Create a document in a vault

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesDocument HTML content
project_idYesProject ID
titleYesDocument title
vault_idYesVault ID

Implementation Reference

  • Core handler function that executes the document creation logic by posting to the Basecamp API.
    async createDocument(
      projectId: string,
      vaultId: string,
      title: string,
      content: string,
      status = 'active'
    ): Promise<Document> {
      const response = await this.client.post(`/buckets/${projectId}/vaults/${vaultId}/documents.json`, {
        title,
        content,
        status,
      });
      return response.data;
    }
  • Input schema for validating tool parameters in MCP tool calls.
    inputSchema: {
      type: 'object',
      properties: {
        project_id: { type: 'string', description: 'Project ID' },
        vault_id: { type: 'string', description: 'Vault ID' },
        title: { type: 'string', description: 'Document title' },
        content: { type: 'string', description: 'Document HTML content' },
      },
      required: ['project_id', 'vault_id', 'title', 'content'],
    },
  • src/index.ts:420-432 (registration)
    Tool object registration in the MCP ListTools handler, defining name, description, and schema.
      name: 'create_document',
      description: 'Create a document in a vault',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: { type: 'string', description: 'Project ID' },
          vault_id: { type: 'string', description: 'Vault ID' },
          title: { type: 'string', description: 'Document title' },
          content: { type: 'string', description: 'Document HTML content' },
        },
        required: ['project_id', 'vault_id', 'title', 'content'],
      },
    },
  • MCP CallToolRequest dispatch handler for create_document, invoking the client method and formatting the tool response.
    case 'create_document': {
      const document = await client.createDocument(
        typedArgs.project_id,
        typedArgs.vault_id,
        typedArgs.title,
        typedArgs.content
      );
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({
            status: 'success',
            document
          }, null, 2)
        }]
      };
    }

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/jhliberty/basecamp-mcp-server'

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