get_space
Fetch details for a ClickUp space by providing its ID. Returns name, settings, features, and metadata.
Instructions
Get details about a specific ClickUp space. Returns space name, settings, features, and metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| space_id | Yes | The ID of the space to get |
Implementation Reference
- src/clickup-client/spaces.ts:68-71 (handler)The actual API call that executes the get_space logic. Calls ClickUp API GET /space/{spaceId} and returns the space details.
async getSpace(spaceId: string): Promise<Space> { const response = await this.client.get(`/space/${spaceId}`); return response; } - src/tools/space-tools.ts:35-57 (handler)The tool handler function defined via server.tool('get_space', ...). This registers the get_space tool and implements the handler that calls spacesClient.getSpace(space_id) and returns the result.
// Register get_space tool server.tool( 'get_space', 'Get details about a specific ClickUp space. Returns space name, settings, features, and metadata.', { space_id: z.string().describe('The ID of the space to get') }, async ({ space_id }) => { try { console.error(`[SpaceTools] Getting space ${space_id}...`); const space = await spacesClient.getSpace(space_id); console.error(`[SpaceTools] Got space: ${space.name}`); return { content: [{ type: 'text', text: JSON.stringify(space, null, 2) }] }; } catch (error: any) { console.error('Error getting space:', error); return { content: [{ type: 'text', text: `Error getting space: ${error.message}` }], isError: true }; } } ); - src/tools/space-tools.ts:37-39 (schema)Input schema for get_space: expects a single required string parameter 'space_id'.
'get_space', 'Get details about a specific ClickUp space. Returns space name, settings, features, and metadata.', { space_id: z.string().describe('The ID of the space to get') }, - src/index.ts:40-47 (registration)The setupSpaceTools(this.server) call inside ClickUpServer.setupTools() triggers registration of the get_space tool on the MCP server.
private setupTools() { // Set up all tools setupTaskTools(this.server); setupDocTools(this.server); setupSpaceTools(this.server); setupChecklistTools(this.server); setupCommentTools(this.server); } - src/tools/space-tools.ts:10-58 (registration)The setupSpaceTools function is exported and called from index.ts to register all space tools (including get_space) on the MCP server.
export function setupSpaceTools(server: McpServer): void { // Register get_spaces tool server.tool( 'get_spaces', 'Get spaces from a ClickUp workspace. Returns space details including name, settings, and features.', { workspace_id: z.string().describe('The ID of the workspace to get spaces from') }, async ({ workspace_id }) => { try { console.error(`[SpaceTools] Getting spaces for workspace ${workspace_id}...`); const spaces = await spacesClient.getSpacesFromWorkspace(workspace_id); console.error(`[SpaceTools] Got ${spaces.length} spaces`); return { content: [{ type: 'text', text: JSON.stringify(spaces, null, 2) }] }; } catch (error: any) { console.error('Error getting spaces:', error); return { content: [{ type: 'text', text: `Error getting spaces: ${error.message}` }], isError: true }; } } ); // Register get_space tool server.tool( 'get_space', 'Get details about a specific ClickUp space. Returns space name, settings, features, and metadata.', { space_id: z.string().describe('The ID of the space to get') }, async ({ space_id }) => { try { console.error(`[SpaceTools] Getting space ${space_id}...`); const space = await spacesClient.getSpace(space_id); console.error(`[SpaceTools] Got space: ${space.name}`); return { content: [{ type: 'text', text: JSON.stringify(space, null, 2) }] }; } catch (error: any) { console.error('Error getting space:', error); return { content: [{ type: 'text', text: `Error getting space: ${error.message}` }], isError: true }; } } ); }