get_content_sites
Retrieve all content sites associated with the current account to manage website operations and content within the Kapiti CMS platform.
Instructions
Get all content sites in the current account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:778-810 (registration)Registration of the 'get_content_sites' tool, including schema (empty input), description, and inline async handler that fetches content sites via API and returns JSON response or error.// Get Content Sites server.registerTool( "get_content_sites", { title: "Get Content Sites", description: "Get all content sites in the current account", inputSchema: {}, }, async ({}) => { try { const response: AxiosResponse<ApiResponse> = await apiClient.get(`/tools/content-sites`); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: handleApiError(error), }, ], isError: true, }; } } );
- src/index.ts:786-810 (handler)Inline handler function for get_content_sites tool: performs GET request to /tools/content-sites, stringifies and returns the API response as text content, or error message if failed.async ({}) => { try { const response: AxiosResponse<ApiResponse> = await apiClient.get(`/tools/content-sites`); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: handleApiError(error), }, ], isError: true, }; } } );
- src/index.ts:87-95 (schema)TypeScript interface defining the structure of ContentSite objects returned in the API response for get_content_sites.interface ContentSite { id: string; name: string; description?: string; accountId: string; isActive: boolean; createdAt: string; updatedAt: string; }