sync-tool-count

sync-tool-count is a command for Claude Code from samaxbytez/freeagent-mcp. It costs 14 tokens per session (204 once invoked), scanned A, original, MIT.

A command that counts registered tools in the src/tools directory and updates the matching tool counts in README.md. It treats the source files as the authoritative count.

In plain words
What is it for?
Use it to reconcile the total count, group headings, and Architecture tree counts, then review a short before-and-after number diff.
Why use it?
It fixes outdated documentation after tools are added or removed, without changing the tools or other README text.

Command for Claude Code

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/samaxbytez/freeagent-mcp/sync-tool-count
Clone the repo
git clone --depth 1 https://github.com/samaxbytez/freeagent-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 sync-tool-count

README.md
[![agentmods](https://agentmods.dev/badge/commands/samaxbytez/freeagent-mcp/sync-tool-count.svg)](https://agentmods.dev/commands/samaxbytez/freeagent-mcp/sync-tool-count)
Your own site
<a href="https://agentmods.dev/commands/samaxbytez/freeagent-mcp/sync-tool-count"><img src="https://agentmods.dev/badge/commands/samaxbytez/freeagent-mcp/sync-tool-count.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 204 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 $0.00014 $0.00204
Opus 5 $0.00007 $0.00102
Sonnet 5 $0.00003 $0.00041
Haiku 4.5 $0.00001 $0.00020

Measured 3d ago against content hash 04f8dc2dcda8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sync-tool-count 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 3d 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/sync-tool-count.md · 21 lines

What it actually says

The README states a total tool count ("Provides N tools …") and a per-group count in each "### (N tools)" heading and the Architecture tree. These drift as tools are added. Reconcile them with the source of truth.

  1. Count registered tools per file by grepping src/tools/*.ts for server.tool( and server.registerTool( (count tool registrations, not helper calls).
  2. Compute the total across all files.
  3. Update in README.md:
    • the intro line "Provides N tools …",
    • each "### (N tools)" heading,
    • the per-file counts in the Architecture tree comments.
  4. Show a short before/after diff of the numbers you changed. Do not touch tool descriptions or any other prose.

This is README-only — no source changes.

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. 3d ago First seen · 21 lines · 14 tokens per session scan A 04f8dc2dcda8

Subscribe to this mod's changes

sync-tool-count is a command published in the GitHub repository samaxbytez/freeagent-mcp (4 stars, last pushed 8d ago), licensed MIT. It adds 14 tokens to every session and 204 once invoked, about $0.0001 per session on Opus 5. 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.