Skip to main content
Glama

maasy_get_crm_summary

Retrieve a CRM pipeline summary: get leads by status, hot leads, contacts, opportunities, and total pipeline value for a brand. Requires brand UUID.

Instructions

CRM pipeline: leads by status, hot leads, contacts, opportunities, total pipeline value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoBrand UUID

Implementation Reference

  • src/index.ts:224-229 (registration)
    Registration of the 'maasy_get_crm_summary' tool via server.tool() with schema and handler binding to 'get_crm_summary'.
    server.tool(
      "maasy_get_crm_summary",
      "CRM pipeline: leads by status, hot leads, contacts, opportunities, total pipeline value.",
      { project_id: z.string().optional().describe("Brand UUID") },
      toolHandler("get_crm_summary")
    );
  • Input schema: project_id (optional string, describes Brand UUID). No output schema defined beyond generic JSON response.
    "maasy_get_crm_summary",
    "CRM pipeline: leads by status, hot leads, contacts, opportunities, total pipeline value.",
    { project_id: z.string().optional().describe("Brand UUID") },
    toolHandler("get_crm_summary")
  • The toolHandler() factory function that wraps all tool calls. For 'maasy_get_crm_summary', it calls callGateway('get_crm_summary', args) which delegates to the remote mcp-gateway edge function.
    function toolHandler(toolName: string, argsFn?: (args: Record<string, unknown>) => Record<string, unknown>) {
      return async (args: Record<string, unknown>) => {
        try {
          const gatewayArgs = argsFn ? argsFn(args) : args;
          // Auto-inject default project_id if not provided
          if (DEFAULT_PROJECT_ID && !gatewayArgs.project_id) {
            gatewayArgs.project_id = DEFAULT_PROJECT_ID;
          }
          const result = await callGateway(toolName, gatewayArgs);
          return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }] };
        } catch (e: unknown) {
          return {
            content: [{ type: "text" as const, text: `Error: ${e instanceof Error ? e.message : String(e)}` }],
            isError: true,
          };
        }
      };
    }
  • The callGateway() function sends the tool name ('get_crm_summary') and args to the Supabase edge function 'mcp-gateway' via POST, which is where the actual CRM summary logic executes.
    export async function callGateway(tool: string, args: Record<string, unknown> = {}): Promise<unknown> {
      const res = await fetch(gatewayUrl, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          [authHeader.name]: authHeader.value,
        },
        body: JSON.stringify({ tool, args }),
      });
    
      const data = await res.json();
    
      if (!res.ok) {
        throw new Error(data.error || `Gateway error (${res.status})`);
      }
    
      return data.result;

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are present, so the description carries the full burden of behavioral disclosure. It lists the returned contents but does not state whether the operation is read-only, what permissions are required, whether the data is aggregated, or what happens when the optional project_id is omitted. This leaves the agent with significant uncertainty about side effects and data scope.

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

Conciseness4/5

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

The description is extremely brief, consisting of a single line with a colon-separated list. It is concise with no filler, which is good, but it lacks a complete sentence structure, making it somewhat abrupt. It earns high marks for brevity but not for structural completeness.

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

Completeness3/5

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

For a simple tool with one optional parameter and no output schema, the description provides a basic inventory of return data. However, it lacks context about the optional parameter, data characteristics (e.g., time range, currency), and relationship to sibling tools, leaving gaps that an agent must infer. This is minimally viable but not fully complete.

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%: the only parameter project_id is described as 'Brand UUID'. The description adds no additional meaning beyond the schema, such as the effect of omitting it (the schema marks it optional) or whether it scopes the summary to a specific brand. Baseline 3 applies because the schema already documents the parameter.

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

Purpose4/5

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

The description enumerates the CRM summary contents (leads by status, hot leads, contacts, opportunities, total pipeline value), clearly identifying the resource and data provided. The verb 'get' in the tool name confirms this is a retrieval operation. However, the description is a noun phrase rather than a full sentence and does not explicitly differentiate from sibling summary tools beyond the 'CRM' qualifier.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus the many sibling tools (e.g., get_content_pipeline, get_campaign_metrics, get_daily_summary). It does not mention prerequisites, which project context is needed, or scenarios where this CRM summary would be preferred over alternatives.

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