Skip to main content
Glama

detect_code_switching

Detect mixed-language (code-switched) text -- per-word language identification across 75 languages, returning a per-word breakdown plus an overall code_switched verdict. The mixed/not-mixed verdict is reliable; per-word attribution for very short words is best-effort and excluded from the verdict. The first call in a session can take longer than later ones.

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": {
      "text": "<text>"
    },
    "name": "detect_code_switching"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text to check for code-switching (mixed-language input).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the output shape (per-word breakdown plus overall verdict), a reliability caveat (verdict reliable, per-word attribution for very short words is best-effort and excluded from the verdict), and a latency trait (first call in a session is slower). That caveat directly affects how an agent should interpret short-word output. It stops short of stating cost, size limits, or whether the call is a pure read analysis, which keeps it below 5.

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?

Three sentences, front-loaded with the verb and scope, then output shape, then caveats. Every sentence adds information an agent can act on: the 75-language scope, the verdict-vs-per-word reliability split, and first-call latency. No filler or restatement of the tool name.

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

Completeness5/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 supplies what is otherwise missing: the return structure, what the verdict means, and where the per-word output is unreliable. Nothing an agent needs in order to call and interpret this tool is absent.

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, and schema description coverage is 100% — the schema already says 'The text to check for code-switching (mixed-language input).' The description restates that meaning rather than adding syntax, size limits, or format guidance beyond it, so the baseline 3 applies.

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: 'Detect mixed-language (code-switched) text', and adds the granularity (per-word language identification across 75 languages) plus the returned artifact (per-word breakdown plus code_switched verdict). An agent knows exactly what this does. It does not name a sibling for contrast, but no sibling in the catalog is a near-equivalent, so the omission costs little.

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 by 'the text to check for code-switching' rather than stated as a when-to-use condition. There are no exclusions, no guidance on what to do with a 'not mixed' result, and no mention of an alternative tool for plain language detection. Adequate but leaves the agent to infer applicability.

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.

Resources