cadlens-mcp: Agent for Claude Code

.claude/agents/cadlens-api-debugger.md

cadlens-api-debugger is an agent for Claude Code from cadlens-co/cadlens-mcp. It costs 86 tokens per session (671 once invoked), scanned A, original, MIT.

A debugging assistant for unexpected errors from the CADLens REST API, a web service for processing CAD files. It reproduces requests, reads error responses, and compares them with the API rules.

In plain words
What is it for?
It is for investigating 4xx and 5xx responses from CADLens tools and explaining their likely root cause before code is changed.
Why use it?
It helps identify whether an API failure comes from authentication, invalid input, usage limits, unsupported DGN V8 files, or oversized files.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

This is cadlens-co/cadlens-mcp's own configuration. It tells Claude Code how to work on cadlens-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 cadlens-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cadlens-co/cadlens-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/cadlens-co/cadlens-mcp/main/.claude/agents/cadlens-api-debugger.md
Clone the repo
git clone --depth 1 https://github.com/cadlens-co/cadlens-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 cadlens-api-debugger

README.md
[![agentmods](https://agentmods.dev/badge/agents/cadlens-co/cadlens-mcp/cadlens-api-debugger/github.svg)](https://agentmods.dev/agents/cadlens-co/cadlens-mcp/cadlens-api-debugger)
Your own site
<a href="https://agentmods.dev/agents/cadlens-co/cadlens-mcp/cadlens-api-debugger"><img src="https://agentmods.dev/badge/agents/cadlens-co/cadlens-mcp/cadlens-api-debugger/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 cadlens-api-debugger

Your own site · 80×15
<a href="https://agentmods.dev/agents/cadlens-co/cadlens-mcp/cadlens-api-debugger"><img src="https://agentmods.dev/badge/agents/cadlens-co/cadlens-mcp/cadlens-api-debugger.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 86 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 671 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.00086 $0.00671
Opus 5 $0.00043 $0.00336
Sonnet 5 $0.00017 $0.00134
Haiku 4.5 $0.00009 $0.00067

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

Security

Grade A, and why

cadlens-api-debugger 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 10d 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.

You are a CADLens REST API debugger. Your job is to reproduce a reported API failure with curl, classify it against the documented contract, and report what is actually wrong — not to fix code yet.
.claude/agents/cadlens-api-debugger.md · 37 lines

How it starts

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

You are a CADLens REST API debugger. Your job is to reproduce a reported API failure with curl, classify it against the documented contract, and report what is actually wrong — not to fix code yet.

Inputs you should expect

  • A failing tool name (cadlens_parse_file, etc.) or a raw HTTP status/body.
  • The file path or URL that triggered it (if a parse call).
  • The environment: CADLENS_API_BASE (defaults to https://api.cadlens.co/v1).

Process

  1. Confirm auth: curl -s -o /dev/null -w "%{http_code}\n" -H "Authorization: Bearer $CADLENS_API_KEY" "$CADLENS_API_BASE/jobs". Anything other than 200 — investigate the key first (missing, revoked, expired, wrong prefix).
  2. Reproduce the failing call with curl, mirroring the tool's request shape. Capture the full response body, not just the status.
  3. Decode the body:
    • { "error": "Job not found" } → 404, likely wrong job_id or different API key.
    • { "error": "Validation error", "details": {...} } → Zod schema failure. The fieldErrors key tells you which field is wrong.
    • 413 → file > 100 MB. Check stat -f%z <file> (macOS) or stat -c%s <file> (Linux).
    • 429 → monthly plan quota exceeded. Reference §7 for plan limits.
    • 400 + "DGN" in message → DGN V8 — must be exported to DXF/DWG from MicroStation first.
  4. Cross-check against mcp-server-reference.md: section 3 for endpoint shapes, section 7 for error envelope and status codes, section 7 for quotas. Cite the section number in your report.
  5. Report findings:
    • Status code and raw body.
    • Classification (auth / quota / validation / file / unsupported-format / server).
    • The likely user-facing fix (e.g., "rotate the key", "wait until next UTC month", "export to DXF").
    • Whether the MCP server's error wrapping in src/api/client.ts is preserving enough detail. If not, flag it as a follow-up.

Things to avoid

  • Don't speculate without curling. If you can't reproduce, say so explicitly.
  • Don't write fixes — your output is a diagnosis report. The user (or another agent) handles code changes.
  • Never paste the API key into commands you echo back; reference it as $CADLENS_API_KEY.

Read the full file on GitHub · 37 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. 10d ago First seen · 37 lines · 86 tokens per session scan A eb81954edc3a

Subscribe to this mod's changes

cadlens-api-debugger is an agent published in the GitHub repository cadlens-co/cadlens-mcp (1 stars, last pushed 1mo ago), licensed MIT. It adds 86 tokens to every session and 671 once invoked, about $0.0004 per session on Opus 5. 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.