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;
Behavior2/5

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

No annotations are present, so the description must disclose behavioral traits. It only lists output fields and does not mention side effects, authentication needs, or rate limits. The tool appears read-only but this is not explicitly stated.

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 concise, consisting of a single phrase. It is front-loaded and contains no superfluous words, though it could be rephrased as a full sentence for better readability.

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?

The description enumerates the key data points returned (leads, hot leads, etc.), which is helpful given the lack of output schema. However, it does not specify the structure (e.g., aggregated numbers or list) or formatting.

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?

The schema covers 100% of parameters with a description for 'project_id' as 'Brand UUID'. The description adds no additional meaning beyond the schema.

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 clearly states the tool provides CRM pipeline data including leads by status, hot leads, contacts, opportunities, and total pipeline value. The verb 'get' is implied by the name, making the purpose understandable.

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 siblings like maasy_get_brand_context or maasy_get_daily_summary. The description lacks usage context or prerequisites.

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

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