Skip to main content
Glama

detect_domain

Classify domain from current directory, project, or initial message to identify context for memory recall and decision injection.

Instructions

Lightweight domain classification from cwd, project, or first message. <20ms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
projectNo
first_messageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool is 'lightweight' and has a performance characteristic (<20ms), which is useful behavioral context. However, it doesn't mention error handling, output format, or whether it's read-only or has side effects, leaving gaps in transparency.

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 a single, efficient sentence that front-loads the purpose ('Lightweight domain classification') and includes key details (inputs and performance). Every word earns its place with no redundancy or waste.

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?

Given the tool has an output schema (which covers return values), no annotations, and low schema coverage, the description is reasonably complete. It specifies the action, inputs, and a performance trait, but could improve by clarifying the domain types or error cases to fully compensate for the lack of annotations.

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 0%, so the description must compensate. It lists the three parameters (cwd, project, first_message) and implies they are alternative inputs for classification, adding meaning beyond the bare schema. However, it doesn't explain what each parameter represents (e.g., 'cwd' as current working directory) or their relationships, resulting in a baseline score.

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 clearly states the tool performs 'domain classification' with specific inputs (cwd, project, or first message), distinguishing it from siblings like 'list_domains' or 'detect_gaps'. However, it doesn't specify what type of domains are classified (e.g., programming languages, project types), leaving some ambiguity.

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?

The description mentions the tool is 'lightweight' and fast (<20ms), which implies usage for quick classification, but provides no explicit guidance on when to use it versus alternatives like 'assess_coverage' or 'detect_gaps'. There are no exclusions or prerequisites stated.

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/cdeust/Cortex'

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