Skip to main content
Glama

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
NameRequiredDescriptionDefault
contentSiteIdYesContent 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,
          };
        }
      }
    );
  • 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 }) => {
  • 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,
        };
      }
    }

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