Skip to main content
Glama

get_tool_context

Retrieve complete context including rules, syntax, and preferences for any tool to maintain consistent settings across chat sessions without manual reconfiguration.

Instructions

Get complete context (rules, syntax, preferences) for a specific tool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tool_nameYesTool name or category (e.g. "git", "dokuwiki", "terraform")

Implementation Reference

  • The request handler logic for 'get_tool_context' tool in the MCP server. It uses the engine to match contexts for the given tool_name and returns them.
    case 'get_tool_context': {
      const toolName = String(args?.['tool_name'] ?? '');
      if (!toolName) {
        return { content: [{ type: 'text', text: 'Error: tool_name is required' }] };
      }
      const matches = engine.matchContexts({ tool: toolName });
      if (matches.length === 0) {
        return {
          content: [{ type: 'text', text: `No context found for tool: ${toolName}` }],
        };
      }
      const merged = matches.map((m) => m.context);
      return { content: [{ type: 'text', text: JSON.stringify(merged, null, 2) }] };
    }
  • The definition and registration of the 'get_tool_context' tool in the MCP server list tools handler.
    {
      name: 'get_tool_context',
      description:
        'Get complete context (rules, syntax, preferences) for a specific tool',
      inputSchema: {
        type: 'object' as const,
        properties: {
          tool_name: {
            type: 'string',
            description: 'Tool name or category (e.g. "git", "dokuwiki", "terraform")',
          },
        },
        required: ['tool_name'],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states what data is retrieved ('rules, syntax, preferences'). It fails to disclose whether this is a safe/idempotent read operation, error handling behavior, or whether the context is cached or real-time.

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?

Single sentence that is front-loaded with the action verb and contains no redundant or wasted words. Efficiently structured, though the brevity contributes to gaps in behavioral transparency and usage guidelines.

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

Completeness3/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 100% schema coverage, the description adequately covers the basic invocation contract. However, given the lack of annotations and output schema, it should ideally describe the return format (structured vs. text) and error scenarios to be fully 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 description coverage is 100% with a well-documented 'tool_name' parameter including examples. The description mentions 'specific tool' which aligns with the parameter, but adds no additional semantic context about valid formats or validation beyond what the schema already provides. Baseline 3 appropriate for high schema coverage.

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?

The description uses a specific verb ('Get') and clearly identifies the resource ('complete context') and its components ('rules, syntax, preferences'). It implicitly distinguishes from sibling 'get_syntax_rules' by promising 'complete' context versus likely narrower syntax-only retrieval, though it doesn't explicitly name siblings.

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?

No guidance provided on when to use this versus siblings like 'get_syntax_rules' or 'list_available_contexts'. The agent must infer from the name alone that this retrieves detailed context for a specific tool rather than listing available ones or getting only syntax rules.

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/doobidoo/MCP-Context-Provider'

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