Skip to main content
Glama

detect_agent

Discover which AI coding agent is active by scanning agent-specific config files, then get best practices for detected and supported agents.

Instructions

Detect which AI coding agent is in use (Claude Code, Cursor, Windsurf, Devin, Codex, Gemini, Antigravity) by scanning for agent-specific config files (.cursorrules, .windsurfrules, CLAUDE.md, AGENTS.md). Returns detected agents and all supported agents with best practices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.2

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does disclose the scanning mechanism and return payload, which is useful, but it omits behavioral details such as read-only safety, handling of missing config files, and whether the cwd parameter changes what is scanned.

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 core purpose before giving the agent list and return summary. Every phrase earns its place with no wasted words.

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?

With no output schema and no annotations, the description needs to carry more context. It covers the return value and supported agents reasonably well, but leaves gaps around cwd semantics, empty-result behavior, and the tool's side-effect profile, making it only minimally complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter, cwd, has zero schema description coverage, and the description never mentions it. While the schema indicates it is an optional string, the agent cannot infer its intended meaning or default behavior without additional guidance.

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 uses a specific verb ('Detect') and resource ('which AI coding agent is in use'), enumerates supported agents, and states the detection mechanism. It is clear but does not explicitly distinguish itself from sibling tools like get_agent_guidance, so it misses the top score.

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?

The context for use is implied: use this when you need to identify which AI coding agent is configured in a project. There is no explicit guidance on when not to use it or which sibling alternatives might be preferable, leaving the agent to infer the appropriate selection.

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