Skip to main content
Glama
competlab

competlab-mcp-server

get_content_dashboard

Analyze competitor content intelligence: sitemap URL counts, strategic URLs, content categories, structure, gap analysis, and AI-driven insights for current snapshot.

Instructions

Get the latest Content Intelligence for all competitors. Returns sitemap URL counts, strategic URL identification, content categorization (11 categories), sitemap structure data, content gap analysis, and AI analysis with insights and actions. Use this for the current snapshot; use get_content_history for past runs or get_content_changelog for URL-level changes. Read-only. Returns JSON object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (from list_projects)

Implementation Reference

  • Generic handler loop that registers all tools, including get_content_dashboard. The tool.path(args) resolves to '/v1/projects/${projectId}/content', and apiGet makes the API call.
    for (const tool of tools) {
      server.tool(tool.name, tool.description, tool.parameters.shape, async (args: Record<string, any>) => {
        const path = tool.path(args);
        const query: Record<string, any> = {};
        for (const key of tool.queryParams ?? []) {
          if (args[key] !== undefined) query[key] = args[key];
        }
        return apiGet(path, Object.keys(query).length ? query : undefined);
      });
  • Schema definition for get_content_dashboard: requires a 'projectId' parameter (24-char hex string). The API path is GET /v1/projects/{projectId}/content.
    {
      name: "get_content_dashboard",
      description:
        "Get the latest Content Intelligence for all competitors. Returns sitemap URL counts, strategic URL identification, content categorization (11 categories), sitemap structure data, content gap analysis, and AI analysis with insights and actions. Use this for the current snapshot; use get_content_history for past runs or get_content_changelog for URL-level changes. Read-only. Returns JSON object.",
      parameters: z.object({
        projectId: objectId("Project ID (from list_projects)"),
      }),
      path: (a) => `/v1/projects/${a.projectId}/content`,
  • src/index.ts:16-25 (registration)
    All tools (including get_content_dashboard) are registered in a loop via server.tool() using the ToolDef array from tools.ts.
    for (const tool of tools) {
      server.tool(tool.name, tool.description, tool.parameters.shape, async (args: Record<string, any>) => {
        const path = tool.path(args);
        const query: Record<string, any> = {};
        for (const key of tool.queryParams ?? []) {
          if (args[key] !== undefined) query[key] = args[key];
        }
        return apiGet(path, Object.keys(query).length ? query : undefined);
      });
    }
  • apiGet helper that executes the HTTP GET request. Called by the handler with path '/v1/projects/{projectId}/content'. Uses COMPETLAB_API_KEY for auth.
    export async function apiGet(
      path: string,
      query?: Record<string, string | number>,
    ): Promise<{ content: Array<{ type: "text"; text: string }>; isError?: true }> {
      const apiKey = process.env.COMPETLAB_API_KEY;
      if (!apiKey) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: "api_key_missing",
                message: "COMPETLAB_API_KEY environment variable is not set",
              }),
            },
          ],
          isError: true,
        };
      }
    
      const url = new URL(`${API_BASE}${path}`);
      if (query) {
        for (const [k, v] of Object.entries(query)) {
          if (v !== undefined) url.searchParams.set(k, String(v));
        }
      }
    
      try {
        const res = await fetch(url, {
          headers: { "CL-API-Key": apiKey },
        });
    
        const body = await res.text();
    
        if (!res.ok) {
          return { content: [{ type: "text", text: body }], isError: true };
        }
    
        return { content: [{ type: "text", text: body }] };
      } catch (err) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: "api_unreachable",
                message:
                  err instanceof Error ? err.message : "Failed to reach CompetLab API",
                status: 503,
              }),
            },
          ],
          isError: true,
        };
      }
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Declares 'Read-only' and 'Returns JSON object', which is sufficient for a simple read. No annotations provided, but description fills gap. However, does not mention any potential errors or prerequisites beyond projectId.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise, front-loaded with purpose, then return content, then usage guidance, then safety and output format. No superfluous sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a snapshot tool with one parameter and no output schema, the description adequately lists major output categories. However, does not specify structure of returned JSON or example values. Could be slightly more detailed given complex output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a single required parameter projectId described as 'Project ID (from list_projects)'. Description adds no additional parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool retrieves the latest Content Intelligence for all competitors. Lists specific data returned (sitemap URLs, categories, gap analysis, etc.). Distinct from siblings like get_content_history and get_content_changelog.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to use for current snapshot, and provides alternatives: get_content_history for past runs, get_content_changelog for URL-level changes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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