Skip to main content
Glama
mcpcatalogs

mcpcatalogs

by mcpcatalogs

get_server_detail

Obtain the full record for a specific MCP server, including summary, install snippet, use cases, FAQ, and selection guidance, from the mcpcatalogs.com directory.

Instructions

Get the full record for a single MCP server: summary, install snippet, use cases, FAQ, 'when to choose / when NOT', and links.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesServer slug, normally "{author}-{repo}". Example: "modelcontextprotocol-server-postgres". You can find slugs via search_mcp_servers or list_top first.

Implementation Reference

  • Main handler function for get_server_detail. Queries the database by slug, validates active status, and builds a detailed markdown response including summary, categories, when-to-choose, when-NOT-to-choose, alternatives, overview, use cases, installation, FAQ, and links.
    export async function handleDetail(args: { slug: string }) {
      const { data, error } = await db()
        .from("mcp_servers")
        .select(SERVER_COLS)
        .eq("slug", args.slug)
        .maybeSingle();
    
      if (error) return asMarkdownText(`Lookup error: ${error.message}`);
      if (!data) return asMarkdownText(`No server with slug "${args.slug}".\n\nTry searching: \`search_mcp_servers\``);
    
      const s = data as ServerRow;
      if (s.status !== "active") {
        return asMarkdownText(
          `Server "${args.slug}" exists but is not active (status: ${s.status}). It's excluded from the public directory.`,
        );
      }
    
      const summary = pick(s.ai_summary) ?? s.description ?? "(no summary)";
      const longDesc = pick(s.ai_long_desc);
      const useCases = pick(s.ai_use_cases) as string[] | null;
      const installMd = pick(s.ai_install_md);
      const faq = s.ai_faq?.en ?? s.ai_faq?.zh ?? null;
      const whenChoose = pick(s.ai_when_to_choose);
      const whenNotChoose = pick(s.ai_when_not_to_choose);
    
      const parts: string[] = [];
      parts.push(`# ${s.name}${s.is_official ? " (official)" : ""}`);
      parts.push(
        `by **${s.author}** · ★${s.stars.toLocaleString()}` +
          (s.smithery_uses_30d != null ? ` · ${s.smithery_uses_30d.toLocaleString()} uses/30d` : "") +
          (s.ai_quality_score != null ? ` · composite ${s.ai_quality_score}/100` : "") +
          (s.last_commit_at ? ` · last commit ${s.last_commit_at.slice(0, 10)}` : ""),
      );
      parts.push("");
      parts.push(summary);
      if (s.ai_categories && s.ai_categories.length > 0) {
        parts.push("");
        parts.push(`**Categories:** ${s.ai_categories.join(", ")}`);
      }
    
      if (whenChoose) {
        parts.push("");
        parts.push(`## When to choose this\n${whenChoose}`);
      }
      if (whenNotChoose) {
        parts.push("");
        parts.push(`## When NOT to choose this\n${whenNotChoose}`);
      }
      if (s.ai_alternatives && s.ai_alternatives.length > 0) {
        parts.push("");
        parts.push(`**Comparable tools:** ${s.ai_alternatives.join(", ")}`);
      }
    
      if (longDesc) {
        parts.push("");
        parts.push(`## Overview\n${longDesc}`);
      }
      if (useCases && useCases.length > 0) {
        parts.push("");
        parts.push(`## Use cases\n${useCases.map((u) => `- ${u}`).join("\n")}`);
      }
      if (installMd) {
        parts.push("");
        parts.push(`## Installation\n${installMd}`);
      }
      if (faq && faq.length > 0) {
        parts.push("");
        parts.push("## FAQ");
        for (const item of faq) {
          parts.push(`**${item.q}**\n${item.a}\n`);
        }
      }
    
      parts.push("");
      parts.push("---");
      parts.push(`Detail page: ${detailUrl(s.slug)}`);
      if (s.repo_url) parts.push(`GitHub: ${s.repo_url}`);
      parts.push(`Last refreshed: ${s.updated_at.slice(0, 10)}`);
    
      return asMarkdownText(parts.join("\n"));
    }
  • Zod schema for the get_server_detail tool input. Defines the 'slug' parameter as a non-empty string with documentation on format and how to find slugs.
    export const detailSchema = {
      slug: z
        .string()
        .min(1)
        .describe(
          'Server slug, normally "{author}-{repo}". Example: "modelcontextprotocol-server-postgres". You can find slugs via search_mcp_servers or list_top first.',
        ),
    };
  • src/index.ts:39-44 (registration)
    Registration of the get_server_detail tool with the MCP server, linking the name, description, schema, and handler together.
    server.tool(
      "get_server_detail",
      "Get the full record for a single MCP server: summary, install snippet, use cases, FAQ, 'when to choose / when NOT', and links.",
      detailSchema,
      async (args) => handleDetail(args),
    );
  • Helper function asMarkdownText which wraps text into the MCP content block format used by the handler's return value.
    function asMarkdownText(text: string) {
      // MCP content block. We never use isError=true for "not found" because
      // callers should treat that as a valid result, not a tool failure.
      return { content: [{ type: "text" as const, text }] };
    }
  • Helper function 'pick' used to extract the English (or fallback Chinese) value from bilingual JSONB fields, used extensively in the handler.
    function pick<T>(obj: { en?: T; zh?: T } | null | undefined): T | null {
      // English is canonical for the MCP server output — LLMs work in English by
      // default and zh fallback would force code-switching mid-citation.
      return obj?.en ?? obj?.zh ?? null;
    }
Behavior4/5

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

No annotations are provided, but the description accurately characterizes this as a read operation ('Get'). It discloses that the result includes specific fields (summary, install snippet, etc.). While no extra behavioral traits (e.g., pagination, auth needs) are mentioned, the explanatory nature of the tool makes this acceptable.

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?

The description is a single sentence that immediately conveys the main action and then lists the included content elements. No extraneous information, perfectly front-loaded.

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

Completeness5/5

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

With one well-documented parameter and no output schema, the description sufficiently covers what the tool returns by enumerating the fields (summary, install snippet, use cases, FAQ, etc.). No gaps remain for effective use.

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% and the slug parameter already has a detailed description (including example and source guidance). The tool description does not add further meaning about the parameter beyond what the schema provides, so baseline 3 is appropriate.

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 clearly states the tool retrieves the full record for a single MCP server and enumerates its contents (summary, install snippet, etc.). It distinctively contrasts with siblings like search_mcp_servers (search interface) and compare_servers (comparison).

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 slug parameter description suggests finding slugs via search_mcp_servers or list_top, providing a clear context for usage. However, the tool description itself does not explicitly state when to use this tool versus siblings, though the purpose strongly implies it's for detailed single-server info.

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/mcpcatalogs/mcpcatalogs'

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