Skip to main content
Glama

list_concepts

Get a ranked list of the main concepts from a codebase to understand its domain vocabulary and semantic overview. Useful for orienting in unfamiliar code or answering what the project is about.

Instructions

List the project's domain vocabulary ranked by importance — a semantic overview of what this codebase is about that reading individual files cannot provide. Returns concept names as a ranked list. Use query_concept or locate_concept to drill into any result. Use when asked 'what is this project about', 'what are the main concepts', or when orienting in an unfamiliar codebase.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNoMaximum number of concepts to return

Implementation Reference

  • Schema/definition for the list_concepts tool including description and optional top_k parameter
    {
      mcpName: "list_concepts",
      label: "List Concepts",
      description:
        "List the project's domain vocabulary ranked by importance. " +
        "A semantic overview of what this codebase is about.",
      promptSnippet:
        "ontomics_list_concepts: ranked domain vocabulary overview",
      parameters: Type.Object({
        top_k: Type.Optional(
          Type.Integer({ description: "Max concepts to return" }),
        ),
      }),
    },
  • Registration of list_concepts (and all other tools) via pi.registerTool. The actual handler logic delegates to an external ontomics binary via McpClient.callTool.
    for (const def of toolDefs()) {
      pi.registerTool({
        name: `ontomics_${def.mcpName}`,
        label: def.label,
        description: def.description,
        promptSnippet: def.promptSnippet,
        promptGuidelines: [
          "Use ontomics tools BEFORE grep/glob for semantic codebase questions.",
        ],
        parameters: def.parameters,
        async execute(_toolCallId, params, _signal, onUpdate, _ctx) {
          onUpdate?.({
            content: [{ type: "text", text: `Querying ontomics: ${def.mcpName}...` }],
          });
          try {
            const mcp = await getClient();
            const text = await mcp.callTool(def.mcpName, cleanArgs(params));
            return { content: [{ type: "text", text }] };
          } catch (err) {
            throw new Error(
              `ontomics ${def.mcpName} failed: ${err instanceof Error ? err.message : String(err)}`,
            );
          }
        },
      });
    }
  • Handler/execute function for list_concepts — sends a JSON-RPC call named 'list_concepts' to the ontomics binary via stdio and returns the text response
        async execute(_toolCallId, params, _signal, onUpdate, _ctx) {
          onUpdate?.({
            content: [{ type: "text", text: `Querying ontomics: ${def.mcpName}...` }],
          });
          try {
            const mcp = await getClient();
            const text = await mcp.callTool(def.mcpName, cleanArgs(params));
            return { content: [{ type: "text", text }] };
          } catch (err) {
            throw new Error(
              `ontomics ${def.mcpName} failed: ${err instanceof Error ? err.message : String(err)}`,
            );
          }
        },
      });
    }
  • McpClient.callTool helper that dispatches the tool call via JSON-RPC to the ontomics server process
    async callTool(
      name: string,
      args: Record<string, unknown>,
    ): Promise<string> {
      const result = (await this.request("tools/call", {
        name,
        arguments: args,
      })) as { content?: Array<{ text?: string }> };
      const text = result.content?.[0]?.text ?? JSON.stringify(result);
      return text;
    }
  • Helper to strip undefined keys before passing parameters (including top_k for list_concepts) to the MCP server
    function cleanArgs(
      params: Record<string, unknown>,
    ): Record<string, unknown> {
      const out: Record<string, unknown> = {};
      for (const [k, v] of Object.entries(params)) {
        if (v !== undefined) out[k] = v;
      }
      return out;
    }
Behavior4/5

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

Discloses it returns a ranked list of concept names, implying a read operation. No annotations provided, but description adequately conveys its non-destructive nature and output format.

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 sentences, front-loaded with purpose, no redundancy, efficiently conveys all necessary information.

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?

Covers output (ranked list of concept names), usage context, and relationship to siblings. Given no output schema, it explains return values adequately. Could mention default behavior for top_k, but overall complete.

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 describes the one optional parameter (top_k) as maximum number of concepts to return. Tool description does not add extra context beyond schema, but schema coverage is 100% 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 lists the project's domain vocabulary ranked by importance, providing a semantic overview. It distinguishes from sibling tools like query_concept and locate_concept for drilling down.

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

Usage Guidelines5/5

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

Explicitly tells when to use the tool: when asked about project's main concepts or orienting in an unfamiliar codebase. Also guides to use query_concept or locate_concept for further exploration.

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/EtienneChollet/ontomics'

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