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/cafreeman/foundry-mcp/foundry_update_specgit clone --depth 1 https://github.com/cafreeman/foundry-mcpWrote 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/commands/cafreeman/foundry-mcp/foundry_update_spec)<a href="https://agentmods.dev/commands/cafreeman/foundry-mcp/foundry_update_spec"><img src="https://agentmods.dev/badge/commands/cafreeman/foundry-mcp/foundry_update_spec.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.02752 |
| Opus 5 | $0.00000 | $0.01376 |
| Sonnet 5 | $0.00000 | $0.00550 |
| Haiku 4.5 | $0.00000 | $0.00275 |
Grade A, and why
foundry_update_spec 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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Update Spec With Foundry
Overview
Perform precise, idempotent updates to specification documents using intelligent edit command strategies.
Context Gathering & Preparation
Specification Loading & Validation:
- Current State Assessment: Load target specification using load_spec to understand current content and structure
- User Intent Analysis: Understand specific changes requested and map to appropriate edit command patterns
- Content Validation: Verify current spec content to ensure edit commands target exact text for reliable execution
Parameter Resolution:
- Missing Project Name: Use list_projects to guide user selection of correct project
- Missing Spec Query: Execute list_specs and present options for user to choose target specification
- Update Requirements: Clarify specific changes needed and validate against current spec structure
Intelligent Edit Command Strategy
Command Selection & Planning
Task Management Operations:
- Mark Task Complete: Use
set_task_statuswith exact task text and "done" status (requires status field) - Reopen Task: Use
set_task_statuswith exact task text and "todo" status (requires status field) - Add New Task: Use
upsert_taskwith new task content in proper checkbox format (requires content field) - Modify Task: Use
upsert_taskwith updated task description (replaces existing, requires content field)
Content Addition Operations:
- Add Requirements: Use
append_to_sectiontargeting "## Requirements" or specific subsection (requires content field) - Expand Implementation: Use
append_to_sectiontargeting "## Implementation Approach" (requires content field) - Update Notes: Use
append_to_sectiontargeting appropriate notes.md section (requires content field) - Extend Acceptance Criteria: Use
append_to_sectiontargeting "## Acceptance Criteria" (requires content field)
Content Removal Operations:
- Remove Task: Use
remove_list_itemwith exact task text (no additional fields) - Remove Content: Use
remove_from_sectionwith section and content to remove (requires content field) - Remove Section: Use
remove_sectionwith section header (no additional fields)
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.
- 4d ago First seen · 241 lines · 0 tokens per session scan A 3f69ef50fb6d
foundry_update_spec is a command published in the GitHub repository cafreeman/foundry-mcp (4 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,752 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.
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.