Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/kaminari-ad/mcpnpx agentmods add rules/kaminari-ad/mcp/mcp-tool-authoringWrote 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.
[](https://agentmods.dev/rules/kaminari-ad/mcp/mcp-tool-authoring)<a href="https://agentmods.dev/rules/kaminari-ad/mcp/mcp-tool-authoring"><img src="https://agentmods.dev/badge/rules/kaminari-ad/mcp/mcp-tool-authoring/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.
<a href="https://agentmods.dev/rules/kaminari-ad/mcp/mcp-tool-authoring"><img src="https://agentmods.dev/badge/rules/kaminari-ad/mcp/mcp-tool-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01598 |
| Opus 5.5 | $0.00000 | $0.00639 |
| Sonnet 5.5 | $0.00000 | $0.00320 |
| Haiku 4.5 | $0.00000 | $0.00160 |
Grade A, and why
mcp-tool-authoring 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 today.
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.
How it starts
The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Tool Authoring Guide — mcp/
What is a tool?
A tool is one user-visible MCP action that wraps exactly one Kaminari Ad /api/v1 endpoint call. If you need two API calls, you need a domain service (in mcp/src/domain/services/), not a single tool.
File layout — one tool per file
mcp/src/application/tools/<domain>/<tool-name>.tool.ts
| Source | File path |
|---|---|
GET /api/v1/scans |
mcp/src/application/tools/scans/list-scans.tool.ts |
GET /api/v1/scans/{id} |
mcp/src/application/tools/scans/get-scan.tool.ts |
POST /api/v1/scans |
mcp/src/application/tools/scans/create-scan.tool.ts |
POST /api/v1/scans/{id}/cancel |
mcp/src/application/tools/scans/cancel-scan.tool.ts |
Template
import { z } from "zod";
import { ok, err, type Result } from "neverthrow";
import type { Tool } from "../_shared/tool.js";
import type { ToolError } from "../_shared/tool-result.js";
// 1. Input schema. Every field has .describe() for the agent.
const ListScansInput = z.object({
status: z
.string()
.optional()
.describe("Comma-separated statuses: pending,running,done,failed."),
date_from: z.string().date().optional().describe("ISO date, inclusive."),
date_to: z.string().date().optional().describe("ISO date, inclusive."),
page: z.number().int().min(1).max(500).default(1).describe("1-indexed page number."),
limit: z.number().int().min(1).max(200).default(50).describe("Page size."),
});
type ListScansInput = z.infer<typeof ListScansInput>;
// 2. Output type — the shape the agent sees in the tool result.
interface ListScansOutput {
readonly total: number;
readonly items: readonly ScanSummary[];
}
// 3. The tool. Named export = camelCase of filename + "Tool".
export const listScansTool: Tool<ListScansInput, ListScansOutput> = {
name: "list_scans",
description: "List scans for the caller's organization, with filters.",
inputSchema: ListScansInput,
handler: async (input, ctx): Promise<Result<ListScansOutput, ToolError>> => {
const apiResult = await ctx.api.listScans(input);
if (apiResult.isErr()) {
return err(apiResult.error);
}
return ok({
total: apiResult.value.total,
items: apiResult.value.items.map(toScanSummary),
});
},
};
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.
- today First seen · 119 lines · 0 tokens per session scan A ac65d34c7b63
mcp-tool-authoring is a cursor rule published in the GitHub repository kaminari-ad/mcp (0 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,598 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-11-05.
Other cursor rules, from other repositories
instructions
Definitive guidelines for building high-performance, maintainable, and secure web applications with actix-web 4, focusing on modern Rust best practices.
search-routing
Smart Search Routing — always use QMD semantic search when available, never bypass with grep for vault content.
aspnet-abp-cursorrules-prompt-file
Cursor rules for Aspnet Abp.
springboot-jpa-best-practices
A set of Chinese-language rules for structuring Java Spring Boot applications that use JPA, a library for database access.
python-django-general
General coding guidance for Python and Django projects, including naming, formatting, modular apps, built-in tools, and maintainable structure. Python is a programming language, and Django is a Python web framework.
nestjs-core-module-guidelines
A set of NestJS rules for application-wide request and error handling. Global filters handle exceptions, middleware manages requests, guards manage permissions, and interceptors manage request processing.