add-tool

add-tool is a command for Claude Code from mingyo186/instrument-mcp. It costs 0 tokens per session (201 once invoked), scanned A, original, MIT.

A project command for adding a new tool to the instrument-mcp server for an oscilloscope, logic analyzer, multimeter, or power supply. An MCP tool is an operation that an AI client can call through the server.

In plain words
What is it for?
Implementing an instrument action, adding its matching mock-driver method, returning structured errors, and writing unit tests. Tool names follow an instrument-and-action pattern such as `scope_capture`.
Why use it?
It sets a consistent structure for input checking, driver calls, result formatting, errors, mock support, and tests. It also requires safety checks for tools that change equipment settings.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions CLAUDE.md.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mingyo186/instrument-mcp/add-tool
Clone the repo
git clone --depth 1 https://github.com/mingyo186/instrument-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 add-tool

README.md
[![agentmods](https://agentmods.dev/badge/commands/mingyo186/instrument-mcp/add-tool.svg)](https://agentmods.dev/commands/mingyo186/instrument-mcp/add-tool)
Your own site
<a href="https://agentmods.dev/commands/mingyo186/instrument-mcp/add-tool"><img src="https://agentmods.dev/badge/commands/mingyo186/instrument-mcp/add-tool.svg" alt="Measured on agentmods" 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 201 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00201
Opus 5 $0.00000 $0.00101
Sonnet 5 $0.00000 $0.00040
Haiku 4.5 $0.00000 $0.00020

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

Security

Grade A, and why

add-tool scanned grade A with 0 findings 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 5d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/add-tool.md · 17 lines

What it actually says

새로운 MCP Tool을 추가합니다.

입력

  • 장비 종류: $ARGUMENTS (scope, logic, dmm, psu 중 하나)

작업 절차

  1. src/tools/{장비}.py에 새 Tool 함수 추가
  2. CLAUDE.md의 Tool 작성 규칙을 따름:
    • 함수명: {instrument}_{action} 패턴
    • docstring: 한국어 + 영어 병기
    • 입력 검증 → Driver 호출 → 결과 포맷팅 순서
    • 에러 시 {"error": str, "code": str, "recoverable": bool} 반환
  3. Tool이 쓰기 동작이면 Safety Layer 검증 추가
  4. Mock 드라이버(src/mock/mock_{장비}.py)에 대응 메서드 추가
  5. tests/unit/에 테스트 추가
  6. 테스트 실행: python -m pytest tests/unit/ -v
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. 5d ago First seen · 17 lines · 0 tokens per session scan A a62939824c5e

Subscribe to this mod's changes

add-tool is a command published in the GitHub repository mingyo186/instrument-mcp (0 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 201 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.