get_content_site_logs
Retrieve the last 15 activity logs for a specific content site to monitor recent changes and track system operations.
Instructions
Get the last 15 activity logs for a content site
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contentSiteId | Yes | Content site ID |
Implementation Reference
- src/index.ts:1884-1915 (registration)Registration of the 'get_content_site_logs' tool using McpServer.registerTool, including inline schema and handler function."get_content_site_logs", { title: "Get ContentSite Logs", description: "Get the last 15 activity logs for a content site", inputSchema: { contentSiteId: z.string().describe("Content site ID"), }, }, async ({ contentSiteId }) => { try { const response: AxiosResponse<ApiResponse<any[]>> = await apiClient.get(`/tools/content-sites/${contentSiteId}/logs`); 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:1886-1892 (schema)Input schema for the tool, defining the required 'contentSiteId' parameter.title: "Get ContentSite Logs", description: "Get the last 15 activity logs for a content site", inputSchema: { contentSiteId: z.string().describe("Content site ID"), }, }, async ({ contentSiteId }) => {
- src/index.ts:1893-1914 (handler)The handler function that performs a GET request to the Headlesshost API endpoint for content site logs and returns the formatted response or error.try { const response: AxiosResponse<ApiResponse<any[]>> = await apiClient.get(`/tools/content-sites/${contentSiteId}/logs`); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: handleApiError(error), }, ], isError: true, }; } }