Skip to main content
Glama

polish_detect_language

Detect a file's language, confidence, and ambiguity, and identify any registered formatter or linter to guide local formatting and review.

Instructions

Detect language, confidence, ambiguity, and registered formatter/linter for a file.

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": {
      "path": "<path>"
    },
    "name": "polish_detect_language"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden; it does disclose the return payload (language, confidence, ambiguity, registered formatter/linter), which is valuable given there is no output schema. It does not state that the operation is read-only, what happens for unknown/unsupported file types, or whether 'ambiguity' is a score or a list of candidates.

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?

A single compact sentence with no filler, and the verb leads. It is efficient, though the density of four enumerated outputs in one clause makes it slightly harder to parse than a short bulleted list would be.

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 one-parameter, read-only detection tool with no annotations and no output schema, the description covers both the inputs implied and the returned fields, which is most of what an agent needs. Gaps remain around failure behavior and the semantics of 'ambiguity', but they are modest for a tool this simple.

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?

Only one parameter ('path') with 0% schema description coverage, but the name is nearly self-documenting. The phrase 'for a file' adds meaning by implying a single file path rather than a directory or project, which differentiates it from project-scoped siblings. Path format expectations (absolute vs relative) remain undocumented in both places.

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 ('Detect') plus the concrete things detected: language, confidence, ambiguity, and the registered formatter/linter. That distinguishes it from siblings like polish_list_languages (supported languages) or polish_check_file, though the description never names an alternative explicitly.

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?

There is no when-to-use guidance, no prerequisites (e.g. does the file need to exist?), and no routing to alternatives such as polish_list_languages or polish_check_file. The agent must infer the use case entirely from the purpose sentence.

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