maasy_get_seo_status
Retrieve SEO/GEO scores, keyword rankings, visibility trends, and top queries for a brand by providing its UUID.
Instructions
SEO/GEO scores, keyword rankings, visibility trends, top queries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Brand UUID |
Implementation Reference
- src/index.ts:241-246 (registration)The tool 'maasy_get_seo_status' is registered with the MCP server, with a Zod schema accepting an optional project_id string.
server.tool( "maasy_get_seo_status", "SEO/GEO scores, keyword rankings, visibility trends, top queries.", { project_id: z.string().optional().describe("Brand UUID") }, toolHandler("get_seo_status") ); - src/index.ts:26-43 (handler)The generic toolHandler function creates an async handler for each tool. For 'maasy_get_seo_status', it calls callGateway('get_seo_status', args) which sends the request 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, }; } }; } - src/supabase.ts:42-59 (helper)The callGateway function sends a POST request with the tool name and args to a remote Supabase edge function (mcp-gateway), which contains the actual business logic for 'get_seo_status'.
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; } - src/index.ts:244-244 (schema)Input schema for 'maasy_get_seo_status': optional project_id (string, described as 'Brand UUID').
{ project_id: z.string().optional().describe("Brand UUID") },