Skip to main content
Glama

maasy_get_brand_context

Retrieve complete brand DNA including name, industry, tone, ideal customer profile, value proposition, assets, and references to ensure consistent, on-brand content generation.

Instructions

Full brand DNA: name, industry, tone, ICP, value prop, assets, references. Essential for on-brand generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoBrand UUID

Implementation Reference

  • src/index.ts:76-81 (registration)
    Registration of the 'maasy_get_brand_context' tool on the MCP server with its description ('Full brand DNA...') and schema (optional project_id). The handler is delegated to toolHandler('get_brand_context').
    server.tool(
      "maasy_get_brand_context",
      "Full brand DNA: name, industry, tone, ICP, value prop, assets, references. Essential for on-brand generation.",
      { project_id: z.string().optional().describe("Brand UUID") },
      toolHandler("get_brand_context")
    );
  • Input schema for the tool: optional project_id (string) with description 'Brand UUID'.
    { project_id: z.string().optional().describe("Brand UUID") },
  • Generic toolHandler wrapper that delegates to callGateway(toolName, args). For 'maasy_get_brand_context', it calls callGateway('get_brand_context', args) which makes a POST to the Supabase 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 a POST request to the configured gateway URL with the tool name and arguments. This is the actual network call that executes the tool logic server-side (the real 'get_brand_context' logic lives in the Supabase edge function, not in this codebase).
    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;
    }
  • The 'active-brand' resource also calls callGateway('get_brand_context') with the default project ID, reusing the same backend logic.
      try {
        const ctx = await callGateway("get_brand_context", { project_id: DEFAULT_PROJECT_ID });
        return { contents: [{ uri: uri.href, mimeType: "application/json", text: JSON.stringify(ctx, null, 2) }] };
      } catch (e: unknown) {
        return {
          contents: [
            { uri: uri.href, mimeType: "text/plain", text: `Error: ${e instanceof Error ? e.message : String(e)}` },
          ],
        };
      }
    });

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It details what the tool returns (brand DNA fields) and implies a read-only operation, but does not go beyond that to mention potential errors, auth requirements, or rate limits. The listing of returned content adds some value, but safety and edge-case behaviors are not addressed.

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?

Two-sentence description that is front-loaded with the core definition, then a quick use-case note. Every word adds value, and the list structure is highly scannable.

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 simple getter with a single parameter and no output schema, the description adequately covers what the tool returns and why it matters. It could mention return format or error scenarios, but given the simplicity, the current level is sufficient.

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 input schema has 100% description coverage, with project_id clearly defined as 'Brand UUID'. The description does not add any additional parameter semantics, so the baseline score of 3 applies. The description's mention of 'brand' implicitly relates to the parameter, but no extra detail is provided.

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?

The description uses the verb 'get' with the resource 'brand context' and specifies the full scope with a detailed list (name, industry, tone, ICP, value prop, assets, references). It clearly distinguishes itself from sibling tools like list_brands by emphasizing 'Full brand DNA' and its unique role in on-brand generation.

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

Usage Guidelines4/5

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

The phrase 'Essential for on-brand generation' provides clear context for when to use this tool. However, it does not explicitly mention alternatives or exclude other tools, though the context implies it is the go-to for complete brand data before content creation.

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