Skip to main content
Glama

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
NameRequiredDescriptionDefault

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, }; } } );
  • 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, }; } } );
  • 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; }

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

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