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.
npx agentmods add commands/mort-lab/excel-mcp/api-contract-definegit clone --depth 1 https://github.com/mort-lab/excel-mcpWhat 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 | $0.00000 | $0.00809 |
| Opus 5 | $0.00000 | $0.00404 |
| Sonnet 5 | $0.00000 | $0.00162 |
| Haiku 4.5 | $0.00000 | $0.00081 |
Grade A, and why
api-contract-define 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 2d 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.
This is a copy
100% identical to api-contract-define — 258 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Define API Contract Between Backend and Frontend
Feature: $ARGUMENTS
Task: Create detailed API contract specification for backend/frontend coordination
-
Define RESTful endpoints:
Base URL: /api/v1/{feature} Endpoints: - GET /api/v1/{features} Query params: page, size, sort, filter Response: Page<{Feature}Response> - GET /api/v1/{features}/{id} Path param: id (Long) Response: {Feature}Response - POST /api/v1/{features} Body: {Feature}Request Response: {Feature}Response (201 Created) - PUT /api/v1/{features}/{id} Path param: id (Long) Body: {Feature}Request Response: {Feature}Response - DELETE /api/v1/{features}/{id} Path param: id (Long) Response: 204 No Content -
Define request/response DTOs:
// Request DTO (for POST/PUT) interface {Feature}Request { name: string; // min: 2, max: 100 description?: string; // max: 1000 // Add domain-specific fields } // Response DTO (for GET) interface {Feature}Response { id: number; name: string; description?: string; createdAt: string; // ISO 8601 updatedAt: string; // ISO 8601 // Add computed fields } // Page response wrapper interface Page<T> { content: T[]; totalElements: number; totalPages: number; size: number; number: number; } -
Define error responses:
{ "timestamp": "2024-01-20T10:30:00Z", "status": 400, "error": "Bad Request", "message": "Validation failed", "path": "/api/v1/{features}", "errors": [ { "field": "name", "message": "Name is required" } ] } -
Define validation rules:
- Backend: Bean Validation annotations
- Frontend: Matching Zod schemas
name: required, 2-100 chars description: optional, max 1000 chars email: valid email format date: ISO 8601 format
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.
- 2d ago First seen · 130 lines · 0 tokens per session scan A 35760ecd2e5f
api-contract-define is a command published in the GitHub repository mort-lab/excel-mcp (5 stars, last pushed 25d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 809 tokens. A static security scan graded it A with 0 findings. It is 100% identical to api-contract-define, differing in 258 lines, and is treated as a copy.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.