get_documents
Retrieve a list of documents from a specific vault by providing the project ID and vault ID, enabling efficient document management within Basecamp MCP Server.
Instructions
List documents in a vault
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID | |
| vault_id | Yes | Vault ID |
Implementation Reference
- src/index.ts:785-797 (handler)MCP tool handler for 'get_documents' that calls the Basecamp client's getDocuments method and returns a formatted JSON response.case 'get_documents': { const documents = await client.getDocuments(typedArgs.project_id, typedArgs.vault_id); return { content: [{ type: 'text', text: JSON.stringify({ status: 'success', documents, count: documents.length }, null, 2) }] }; }
- src/index.ts:407-418 (registration)Registration of the 'get_documents' tool in the MCP server's tools list, including name, description, and input schema.{ name: 'get_documents', description: 'List documents in a vault', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID' }, vault_id: { type: 'string', description: 'Vault ID' }, }, required: ['project_id', 'vault_id'], }, },
- src/index.ts:410-417 (schema)Input schema definition for the 'get_documents' tool validating project_id and vault_id parameters.inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID' }, vault_id: { type: 'string', description: 'Vault ID' }, }, required: ['project_id', 'vault_id'], },
- src/lib/basecamp-client.ts:327-330 (helper)Core helper method in BasecampClient that performs the API call to retrieve documents from a project vault.async getDocuments(projectId: string, vaultId: string): Promise<Document[]> { const response = await this.client.get(`/buckets/${projectId}/vaults/${vaultId}/documents.json`); return response.data; }