testdino-mcp: Command for Claude Code

.claude/commands/investigate-tool.md

investigate-tool is a command for Claude Code from testdino-hq/testdino-mcp. It costs 0 tokens per session (463 once invoked), scanned A, original, MIT.

A command for investigating why a tool behaves unexpectedly, such as returning wrong data, failing authentication, or omitting valid results.

In plain words
What is it for?
Use it when debugging a tool that is not working as expected. It reproduces the issue, reads the relevant handler, and checks its inputs, credentials, endpoint, API response, and formatting.
Why use it?
It traces the problem from the input and authentication through URL construction, the API response, and output formatting. This helps locate which layer is causing the failure.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is testdino-hq/testdino-mcp's own configuration. It tells Claude Code how to work on testdino-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything testdino-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to testdino-hq/testdino-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/testdino-hq/testdino-mcp/main/.claude/commands/investigate-tool.md
Clone the repo
git clone --depth 1 https://github.com/testdino-hq/testdino-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for investigate-tool

README.md
[![agentmods](https://agentmods.dev/badge/commands/testdino-hq/testdino-mcp/investigate-tool/github.svg)](https://agentmods.dev/commands/testdino-hq/testdino-mcp/investigate-tool)
Your own site
<a href="https://agentmods.dev/commands/testdino-hq/testdino-mcp/investigate-tool"><img src="https://agentmods.dev/badge/commands/testdino-hq/testdino-mcp/investigate-tool/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for investigate-tool

Your own site · 80×15
<a href="https://agentmods.dev/commands/testdino-hq/testdino-mcp/investigate-tool"><img src="https://agentmods.dev/badge/commands/testdino-hq/testdino-mcp/investigate-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 463 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00463
Opus 5 $0.00000 $0.00231
Sonnet 5 $0.00000 $0.00093
Haiku 4.5 $0.00000 $0.00046

Measured 12d ago against content hash ce0e7c436159, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

investigate-tool scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

**Input:** $ARGUMENTS — description of the problem (e.g., "list_testruns returns empty for valid projectId", "health tool says PAT is invalid but it works in curl")
.claude/commands/investigate-tool.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Investigate why a tool is not working as expected. This command is for debugging tool behavior — wrong responses, auth failures, missing data, or unexpected errors.

Input: $ARGUMENTS — description of the problem (e.g., "list_testruns returns empty for valid projectId", "health tool says PAT is invalid but it works in curl")


Phase 1: Reproduce the Problem

  1. Identify the tool — Which tool is affected?
  2. Read the tool source — Read the handler file completely
  3. Trace the data flow:
    • What args does the handler expect?
    • How does it build the API URL? (check endpoints.ts)
    • What does apiRequestJson do with the response?
    • How does it format the output?

Phase 2: Check Each Layer

Work from the outside in:

  1. Input layer — Is the tool schema correct? Are required/optional fields right? Would the AI agent send the right args based on the description?
  2. Auth layer — Does getApiKey(args) resolve correctly? Is the token being passed in the Authorization header?
  3. URL layer — Is the endpoint URL correct? Are query params properly built? Log the URL if needed
  4. API layer — Does the API actually return what we expect? Check if the response is wrapped ({ success, data } vs direct)
  5. Response layer — Is the response being formatted correctly for MCP? Is JSON.stringify applied?

Phase 3: Fix

  1. Fix the root cause — don't add workarounds
  2. Run npm run typecheck && npm run lint
  3. If the fix changes tool behavior, update docs/TOOLS.md

Anti-Patterns

Don't Why
Add try/catch that swallows errors Hides the real problem
Change the tool description to work around a bug Fixes the symptom, not the cause
Hardcode values to make it "work" Breaks for other inputs
Skip checking endpoints.ts Most URL bugs live there

Read the full file on GitHub · 47 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 47 lines · 0 tokens per session scan A ce0e7c436159

Subscribe to this mod's changes

investigate-tool is a command published in the GitHub repository testdino-hq/testdino-mcp (9 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 463 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.