Skip to main content
Glama

code-test-detector

Analyzes code snippets or GitHub repositories to detect testing frameworks, test functions, and coverage presence without executing code.

Instructions

Detects testing frameworks and test coverage presence in a code snippet or GitHub repository. For code snippets: identifies test functions, assertions, mocks, fixtures, and frameworks (Jest, pytest, go test, JUnit, RSpec, etc.). For GitHub repos: counts test files vs source files, surfaces config files, and gives a coverage verdict. No code execution — pure static analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoCode snippet to analyze for test patterns.
filenameNoOptional filename for the code snippet (e.g. 'utils.test.js') — helps confirm test file naming conventions.
github_repoNoGitHub repository in 'owner/repo' format (e.g. 'facebook/react'). Analyzes the full repo file tree for test coverage.
Behavior4/5

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

With no annotations, the description must disclose behavioral traits. It states 'No code execution — pure static analysis,' indicating safety and non-destructiveness. It explains what it identifies (test functions, assertions, etc.) but does not mention permissions, rate limits, or API dependencies for GitHub repo analysis.

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?

Two efficient sentences: first sentence states the purpose, second expands on both usage modes. Every sentence adds value with no redundancy. Front-loaded with the key action and scoped with examples.

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 complexity of dual modes (snippet and repo) and no output schema, the description adequately covers what the tool does and what it returns (e.g., coverage verdict, config files). It lacks detailed output structure but provides sufficient context for an agent to decide on invocation.

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

Parameters4/5

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

Schema coverage is 100% with descriptive parameter explanations. The description adds value by explaining processing modes (e.g., 'surfaces config files' for repos) beyond the schema's basic descriptions. It compensates well for the lack of required parameters.

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 precisely states it detects testing frameworks and coverage presence for code snippets or GitHub repos, with concrete examples (Jest, pytest, etc.) and specific actions (counts test files, surfaces config files). It clearly distinguishes itself from siblings like code-api-surface.

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?

The description implies usage for analyzing test coverage in code or repos but does not explicitly state when to use this tool over alternatives or when not to use it. It provides clear context for two modes (snippet vs. repo) but lacks exclusion guidance.

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/thebrierfox/the-stall'

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