Skip to main content
Glama

suggest_name

Generate project-consistent identifier names from a natural language description. Uses actual conventions like prefixes and patterns to suggest names that fit the existing codebase style. Use when naming functions, variables, or parameters.

Instructions

Generate project-consistent identifier names from a natural language description. Uses the project's actual conventions (prefixes like nb_, patterns like is_/has_, conversion patterns like x_to_y) to suggest names that fit the existing codebase style. Use when naming new functions, variables, or parameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesNatural language description (e.g. 'count of features')

Implementation Reference

  • Definition of the suggest_name tool including its MCP name, label, description, prompt snippet, and parameters schema (requires 'description' string).
    {
      mcpName: "suggest_name",
      label: "Suggest Name",
      description:
        "Generate project-consistent identifier names from a natural language " +
        "description using the project's actual conventions.",
      promptSnippet:
        "ontomics_suggest_name: generate convention-consistent names from description",
      parameters: Type.Object({
        description: Type.String({
          description: "Natural language description (e.g. 'count of features')",
        }),
      }),
    },
  • Registration of all ontomics tools (including suggest_name) via pi.registerTool(), wrapping each tool definition with an execute handler that delegates to the MCP client.
    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)}`,
            );
          }
        },
      });
    }
  • The execute function for suggest_name (and all other ontomics tools). It calls the MCP client's callTool with the mcpName 'suggest_name', which delegates to an external ontomics serve process via JSON-RPC.
    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)}`,
        );
      }
    },
  • The McpClient.callTool helper method that sends a JSON-RPC tools/call with the tool name (e.g., 'suggest_name') and arguments to the external ontomics process over stdio.
    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;
    }
Behavior4/5

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

Describes that it uses project conventions and suggests names fitting existing style. No annotations provided, so description carries full burden; it adequately conveys the tool's behavior without contradictions, but could mention that it does not modify anything.

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 succinct sentences that are front-loaded with the core purpose, no wasted words.

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 single-parameter tool with no output schema, the description is mostly complete. It could clarify the return format (e.g., list of suggested names), but the essential purpose and usage are clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a description for the 'description' parameter. The tool's description adds an example ('count of features'), enhancing understanding beyond the schema alone.

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?

Clearly states it generates identifier names from natural language using project conventions, with specific examples of patterns. Distinguishes from siblings (e.g., check_naming) by focusing on generation rather than validation.

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?

Explicitly specifies 'Use when naming new functions, variables, or parameters.' Provides clear context for when to use, though does not mention when not to use or alternative tools.

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