Skip to main content
Glama

detect_language

Detect the programming language of a code snippet. Returns the detected language and confidence level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code snippet to analyze

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It states that it returns language and confidence but does not describe limitations, supported languages, or error behavior for ambiguous snippets.

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 two short sentences that are direct and free of fluff. Every word contributes to the tool's purpose and return behavior.

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 simple single-parameter tool, the description is adequate but lacks context on language coverage, edge cases, or the exact response structure. Without an output schema, the return format is only vaguely described.

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?

The input schema fully documents the single 'code' parameter, so the description adds minimal additional semantic value. The description's mention of 'code snippet' aligns with the schema, but doesn't add new meaning beyond what's already stated.

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 uses the specific verb 'Detect' with the resource 'programming language of a code snippet', clearly distinguishing it from sibling tools like explain_code or analyze_complexity. It also mentions the return value (language and confidence), making the purpose unambiguous.

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 is provided on when to use this tool versus alternatives. The description does not mention any constraints, alternatives, or typical use cases beyond the obvious function.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4/5.0
Disambiguation5/5

Each tool targets a distinct aspect of code analysis: language detection, explanation, docstring generation, complexity metrics, and refactoring suggestions. analyze_all is explicitly a combined wrapper, so agents won't confuse it with individual tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., detect_language, explain_code, generate_docstring). analyze_all uses the same verb-first structure, with 'all' as the object, preserving the convention.

Tool Count5/5

Six tools is an ideal size for a code analysis server, covering the main analysis categories without bloat. Each tool provides a distinct value and the combined analyze_all tool adds convenience without unnecessary overhead.

Completeness5/5

The tool surface comprehensively covers the domain of code explanation and analysis: language detection, natural-language explanation, docstring generation, complexity assessment, and refactoring suggestions. The analyze_all tool ensures all features are accessible in one call, leaving no obvious gaps for common code-explanation workflows.