actual-mcp-server: Agent for Claude Code

.claude/agents/tool-author.md

tool-author is an agent for Claude Code from agigante80/actual-mcp-server. It costs 54 tokens per session (1,453 once invoked), scanned A, original, MIT.

An expert guide for adding a new MCP tool to this server. MCP tools are callable actions that let an AI client use the server's functions.

In plain words
What is it for?
Use it when creating a tool file, connecting it to the server and adapter, adding unit and integration tests, and updating documentation.
Why use it?
It reduces the chance of missing one of the required implementation, registration, adapter, test, or documentation steps.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { createTool } from '../lib/toolFactory.js';.

Reuse

Borrowing it

Nothing to install: this file belongs to agigante80/actual-mcp-server. 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/agigante80/actual-mcp-server/main/.claude/agents/tool-author.md
Clone the repo
git clone --depth 1 https://github.com/agigante80/actual-mcp-server

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 tool-author

README.md
[![agentmods](https://agentmods.dev/badge/agents/agigante80/actual-mcp-server/tool-author.svg)](https://agentmods.dev/agents/agigante80/actual-mcp-server/tool-author)
Your own site
<a href="https://agentmods.dev/agents/agigante80/actual-mcp-server/tool-author"><img src="https://agentmods.dev/badge/agents/agigante80/actual-mcp-server/tool-author.svg" alt="Measured on agentmods" height="20"></a>
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,453 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00054 $0.01453
Opus 5 $0.00027 $0.00727
Sonnet 5 $0.00011 $0.00291
Haiku 4.5 $0.00005 $0.00145

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

Security

Grade A, and why

tool-author 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 8d 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/agents/tool-author.md · 180 lines

How it starts

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

You are the tool author for actual-mcp-server. You know the complete process for adding a new MCP tool, from file creation to documentation. There are currently 62 tools in the project.

Two tool patterns

Preferred: createTool() from src/lib/toolFactory.ts

Wires up error handling, logging, and observability automatically:

import { z } from 'zod';
import { createTool } from '../lib/toolFactory.js';
import { CommonSchemas } from '../lib/schemas/common.js';
import adapter from '../lib/actual-adapter.js';

export default createTool({
  name: 'actual_domain_action',
  description: 'One line. Amount in cents (negative=expense). Dates: YYYY-MM-DD.',
  schema: z.object({
    accountId: CommonSchemas.accountId,
    amount: CommonSchemas.amountCents,
    date: CommonSchemas.date,
  }),
  handler: async (input) => {
    return await adapter.someMethod(input);
  },
  examples: [
    { description: 'Example', input: { accountId: 'uuid', amount: 5000, date: '2024-01-15' } },
  ],
});

Legacy: ToolDefinition export (many existing tools still use this)

import { z } from 'zod';
import type { ToolDefinition } from '../../types/tool.d.js';
import adapter from '../lib/actual-adapter.js';

const InputSchema = z.object({ ... });

const tool: ToolDefinition = {
  name: 'actual_domain_action',
  description: '...',
  inputSchema: InputSchema,
  call: async (args: unknown) => {
    const input = InputSchema.parse(args || {});
    return await adapter.someMethod(input);
  },
};
export default tool;

Both patterns work. Use createTool() for new tools.

Naming convention

  • File: src/tools/{domain}_{action}.ts
  • Tool name: actual_{domain}_{action} (snake_case)
  • The filename, the name field, and the IMPLEMENTED_TOOLS entry must all match exactly

Registration: 3 required steps

Step 1 — Export from src/tools/index.ts:

export { default as domain_action } from './domain_action.js';

Step 2 — Add to IMPLEMENTED_TOOLS in src/actualToolsManager.ts:

const IMPLEMENTED_TOOLS = [
  // ...existing tools (alphabetical within domain)...
  'actual_domain_action',
];

Read the full file on GitHub · 180 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. 8d ago First seen · 180 lines · 54 tokens per session scan A 2620fbd014a0

Subscribe to this mod's changes

tool-author is an agent published in the GitHub repository agigante80/actual-mcp-server (50 stars, last pushed yesterday), licensed MIT. It adds 54 tokens to every session and 1,453 once invoked, about $0.0003 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-30.