Skip to main content
Glama
rad1092

firstcall-demo-mcp-server

github_user_lookup

github_user_lookup
Read-onlyIdempotent

Retrieve public GitHub user profile data by providing a username. Returns profile information for the specified user.

Instructions

Verified API tool recipes for AI agents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYespath

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
okYes
body_previewYes

Implementation Reference

  • The RECIPE object that defines the tool's configuration: name 'github_user_lookup', HTTP method GET, URL template to GitHub Users API, headers, auth type 'none', and body kind 'none'. This serves as the schema/metadata for the tool.
    const RECIPE = {
      "name": "github_user_lookup",
      "description": "Verified API tool recipes for AI agents.",
      "method": "GET",
      "url_template": "https://api.github.com/users/${username}",
      "auth_type": "none",
      "bearer_token_env": null,
      "basic_username_env": null,
      "basic_password_env": null,
      "header_api_key_header": null,
      "header_api_key_env": null,
      "query_api_key_param": null,
      "query_api_key_env": null,
      "headers": {
        "Accept": "application/vnd.github+json",
        "User-Agent": "firstcall-demo-mcp-server"
      },
      "query": {},
      "body_kind": "none",
      "body_template": {}
    };
  • Input and output Zod schemas for the tool. Input accepts a 'username' (string, path param). Output returns status (number), ok (boolean), and body_preview (string).
    const inputShape = {
      "username": z.string().describe("path")
    };
    const inputSchema = z.object(inputShape);
    const outputSchema = z.object({
      status: z.number(),
      ok: z.boolean(),
      body_preview: z.string(),
    });
  • src/server.ts:59-113 (registration)
    Registration of the tool via server.registerTool() with the name 'github_user_lookup', its input/output schemas, annotations, and the async handler callback that executes the HTTP request.
    server.registerTool(TOOL_NAME, {
      title: TOOL_NAME,
      description: TOOL_DESCRIPTION,
      inputSchema,
      outputSchema,
      annotations: TOOL_ANNOTATIONS,
    }, async (args) => {
      const toolArgs = args as ToolArgs;
      const url = new URL(fillTemplate(RECIPE.url_template, toolArgs));
      for (const [key, value] of Object.entries(RECIPE.query)) {
        url.searchParams.append(key, fillTemplate(String(value), toolArgs));
      }
    
      const headers: Record<string, string> = {};
      for (const [key, value] of Object.entries(RECIPE.headers)) {
        headers[key] = fillTemplate(String(value), toolArgs);
      }
      applyAuth(headers, url);
    
      const init: RequestInit = {
        method: RECIPE.method,
        headers,
      };
    
      if (RECIPE.body_kind !== "none") {
        const renderedBody = renderTemplateValue(RECIPE.body_template, toolArgs);
        if (RECIPE.body_kind === "text") {
          init.body = String(renderedBody);
        } else if (RECIPE.body_kind === "form") {
          init.body = new URLSearchParams(stringRecord(renderedBody)).toString();
          setDefaultHeader(headers, "Content-Type", "application/x-www-form-urlencoded");
        } else {
          init.body = JSON.stringify(renderedBody);
          setDefaultHeader(headers, "Content-Type", "application/json");
        }
      }
    
      const response = await fetch(url, init);
      const bodyText = await response.text();
      const redactedBodyPreview = redactResponsePreview(bodyText);
      const structuredContent: ToolOutput = {
        status: response.status,
        ok: response.ok,
        body_preview: redactedBodyPreview,
      };
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(structuredContent),
          },
        ],
        structuredContent,
      };
    });
  • The async handler function that executes the GitHub user lookup logic: fills the URL template with args, applies query params, sets headers, applies auth, makes the HTTP GET fetch request, reads the response body, redacts sensitive fields, and returns structured content with status/ok/body_preview.
    }, async (args) => {
      const toolArgs = args as ToolArgs;
      const url = new URL(fillTemplate(RECIPE.url_template, toolArgs));
      for (const [key, value] of Object.entries(RECIPE.query)) {
        url.searchParams.append(key, fillTemplate(String(value), toolArgs));
      }
    
      const headers: Record<string, string> = {};
      for (const [key, value] of Object.entries(RECIPE.headers)) {
        headers[key] = fillTemplate(String(value), toolArgs);
      }
      applyAuth(headers, url);
    
      const init: RequestInit = {
        method: RECIPE.method,
        headers,
      };
    
      if (RECIPE.body_kind !== "none") {
        const renderedBody = renderTemplateValue(RECIPE.body_template, toolArgs);
        if (RECIPE.body_kind === "text") {
          init.body = String(renderedBody);
        } else if (RECIPE.body_kind === "form") {
          init.body = new URLSearchParams(stringRecord(renderedBody)).toString();
          setDefaultHeader(headers, "Content-Type", "application/x-www-form-urlencoded");
        } else {
          init.body = JSON.stringify(renderedBody);
          setDefaultHeader(headers, "Content-Type", "application/json");
        }
      }
    
      const response = await fetch(url, init);
      const bodyText = await response.text();
      const redactedBodyPreview = redactResponsePreview(bodyText);
      const structuredContent: ToolOutput = {
        status: response.status,
        ok: response.ok,
        body_preview: redactedBodyPreview,
      };
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(structuredContent),
          },
        ],
        structuredContent,
      };
    });
Behavior3/5

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

Annotations clearly indicate read-only, non-destructive, idempotent behavior. The description adds no additional behavioral context beyond what the annotations already provide. Since annotations are explicit, the bar is lower, and a score of 3 is appropriate as the description does not contradict them.

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

Conciseness2/5

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

The description is a single sentence but is vague and uninformative. It does not earn its place; conciseness should provide value, not just brevity. The sentence could be replaced with nothing without loss of information.

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

Completeness2/5

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

Despite having a simple structure with one parameter and an output schema, the description fails to explain the tool's core function (looking up GitHub users). A complete description would state the purpose clearly; this one is insufficient for an agent to understand its role.

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% coverage with a single parameter 'username' described as 'path'. The description adds no further meaning, so it does not enhance understanding beyond the schema. Baseline score of 3 is appropriate given high schema coverage.

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

Purpose1/5

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

The description 'Verified API tool recipes for AI agents' is extremely generic and does not specify what the tool does. It lacks a verb and resource, and fails to distinguish it from any other tool. The tool name 'github_user_lookup' hints at the purpose, but the description does not reinforce it.

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?

There is no guidance on when to use this tool versus alternatives. The description provides no context about the tool's purpose or appropriate use cases, leaving the agent to infer from the name alone. No exclusion criteria or alternative tools are mentioned.

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/rad1092/firstcall-api-lookup-mcp'

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