Skip to main content
Glama
grandMA2 MCP
by drohi-r

suggest_tool_for_task

Matches a natural-language task description to relevant grandMA2 MCP tools using semantic similarity, with keyword fallback when embeddings are unavailable.

Instructions

Suggest MCP tools for a natural-language task description (SAFE_READ).

Embeds the task description and finds the closest tools by cosine
similarity against stored docstring embeddings.  Falls back to keyword
matching when using the zero-vector provider or when no embedding token
is available.

Args:
    task_description: What you want to accomplish (e.g. "fade out all fixtures").
    top_n: Number of suggestions to return (default 3).
    provider: Embedding provider — "zero" (keyword fallback) or "github".
        Overridden by ``prefer_semantic`` when a token is available.
    prefer_semantic: When True (default), automatically use embedding-based
        search if GITHUB_MODELS_TOKEN is set in the environment.  Falls back
        to keyword matching with a ``warning`` field when no token is present.
        Set to False to force keyword matching regardless of token availability.

Returns:
    str: JSON array of suggested tools with scores and descriptions.
         Includes a top-level ``warning`` key when semantic search was
         requested but fell back to keyword matching.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "task_description": "<task_description>"
    },
    "name": "suggest_tool_for_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
top_nNo
providerNozero
prefer_semanticNo
task_descriptionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses the embedding-plus-cosine-similarity mechanism, the keyword fallback condition, the warning key emitted on fallback, and that the operation is read-only (SAFE_READ). It omits anything about result freshness or whether suggestions can be stale relative to tool changes, but the operational behavior is otherwise well covered.

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

Conciseness4/5

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

Front-loaded with a clear one-line purpose, then Args/Returns blocks that are easy to scan. The explicit fallback clause appears both in the prose and again under prefer_semantic, which is mild redundancy but reinforces rather than confuses.

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?

An output schema exists and the description still summarizes the return shape, so an agent knows to expect a JSON array plus a possible warning key. For a four-parameter read-only suggestion tool with no annotations, this is nearly complete; what is missing is guidance on interpreting or acting on low-similarity results.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate entirely and it does: each of the four parameters is explained with meaning, defaults, and interaction rules (provider is overridden by prefer_semantic, which is gated on GITHUB_MODELS_TOKEN). It even gives a concrete example value for task_description, which the bare schema title never could.

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

Purpose4/5

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

States a specific verb and resource ('Suggest MCP tools for a natural-language task description') and flags the safety profile with SAFE_READ, so an agent knows exactly what it produces. It does not explicitly differentiate itself from the sibling suggest_skills_for_task, which is the only thing keeping it off a 5.

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

Usage Guidelines3/5

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

Usage context is implied: you have a fuzzy goal in natural language and want tool suggestions. The description spends its guidance budget on provider mechanics rather than on when to choose this over suggest_skills_for_task or direct tool browsing, and offers no explicit exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools