outline_get_collection
Retrieve detailed information about a specific collection from Outline documents. Use this tool to access collection data by providing its unique ID for document organization and management.
Instructions
Get information about a specific collection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the collection to retrieve |
Implementation Reference
- src/outline-client.ts:206-222 (handler)The client method that executes the API request for fetching collection details.
async getCollection(id: string): Promise<Collection> { const endpoints = ['/api/collections.info', '/api/collections/info', '/api/collection/info']; for (const endpoint of endpoints) { try { const response = await this.api.post(endpoint, { id }); return response.data.data || response.data; } catch (error: any) { if (error.response?.status === 404 && endpoint !== endpoints[endpoints.length - 1]) { console.error(`Endpoint ${endpoint} not found, trying next...`); continue; } throw error; } } throw new Error('No valid endpoint found for getting collection'); } - src/index.ts:298-310 (handler)The MCP tool handler that invokes the OutlineClient method when 'outline_get_collection' is called.
case 'outline_get_collection': return { content: [ { type: 'text', text: JSON.stringify( await this.outlineClient.getCollection(args.id as string), null, 2 ), }, ], }; - src/index.ts:144-157 (schema)The definition and input schema for the 'outline_get_collection' tool.
{ name: 'outline_get_collection', description: 'Get information about a specific collection', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'The ID of the collection to retrieve', }, }, required: ['id'], }, },