Skip to main content
Glama

HebrewCore by baba Hebrew

Detect language

detect_language
Read-onlyIdempotent

Detect the dominant language, script and direction of a string, with one segment per language. Built for short, code-switched input (chat messages, search queries, voice transcripts): a brand or acronym such as "PayPal" or "API" inside a Hebrew or Russian sentence does not change the dominant language. Use it to pick source_lang or the reply language before translating. Latin script is tagged en. Deterministic and free: no character quota.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to classify, up to 20,000 characters. Built for short, code-switched input.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoBase direction of the dominant language.
langNoDominant language (BCP 47). Latin script is tagged `en`.
scriptNoDominant ISO 15924 script.
segmentsNoSame-script stretches in order, e.g. ru · en ("CBC") · ru. Latin script is tagged en.
languagesNoEvery language found, largest share first.
confidenceNoShare of letters in the dominant language, 0 to 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description adds valuable behavioral detail: brand/acronym tokens do not shift dominant language, Latin script is tagged as 'en', results are deterministic, and there is no character quota. This gives the agent useful expectations about the tool's behavior without contradicting the annotations.

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 compact yet information-dense: purpose first, then use case, language-tagging behavior, and operational guarantees. Every sentence contributes to correct selection and invocation, with no filler.

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, read-only tool with an output schema, the description covers what the tool does, how to use it in a workflow, what to expect (segments, en tagging, code-switching tolerance), and its operational characteristics. Nothing essential is missing.

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 coverage is 100% and there is only one parameter, text, whose purpose and max length are already documented in the schema. The description reinforces that the input is short and code-switched, but adds no new parameter syntax or format information beyond the schema.

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 states a specific action and resource: detect the dominant language, script, and direction of a string, with one segment per language. This clearly distinguishes it from siblings like translate, transliterate, analyze_direction, and add_nikud, even without naming them.

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

Usage Guidelines4/5

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

It gives explicit guidance to use the tool to pick source_lang or the reply language before translating, and explains it is built for short, code-switched input. It does not explicitly describe when not to use it or mention alternative tools by name, so it stops just short of a 5.

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.