foundry_update_spec

foundry_update_spec is a command for Cursor from cafreeman/foundry-mcp. It costs 0 tokens per session (2,752 once invoked), scanned A, original, MIT.

A command for making precise, repeatable updates to specification documents. It first checks the current project and document so edits target the intended text.

In plain words
What is it for?
Use it to load and update specifications, mark tasks done or reopen them, and apply requested changes to the correct project document.
Why use it?
It reduces accidental or duplicate edits when changing requirements, tasks, or other parts of an existing specification.

Command for Cursor

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/cafreeman/foundry-mcp/foundry_update_spec
Clone the repo
git clone --depth 1 https://github.com/cafreeman/foundry-mcp

Made for: Cursor.

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 foundry_update_spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/cafreeman/foundry-mcp/foundry_update_spec.svg)](https://agentmods.dev/commands/cafreeman/foundry-mcp/foundry_update_spec)
Your own site
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,752 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.00000 $0.02752
Opus 5 $0.00000 $0.01376
Sonnet 5 $0.00000 $0.00550
Haiku 4.5 $0.00000 $0.00275

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

Security

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.

.cursor/commands/foundry_update_spec.md · 241 lines

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:

  1. Current State Assessment: Load target specification using load_spec to understand current content and structure
  2. User Intent Analysis: Understand specific changes requested and map to appropriate edit command patterns
  3. 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_status with exact task text and "done" status (requires status field)
  • Reopen Task: Use set_task_status with exact task text and "todo" status (requires status field)
  • Add New Task: Use upsert_task with new task content in proper checkbox format (requires content field)
  • Modify Task: Use upsert_task with updated task description (replaces existing, requires content field)

Content Addition Operations:

  • Add Requirements: Use append_to_section targeting "## Requirements" or specific subsection (requires content field)
  • Expand Implementation: Use append_to_section targeting "## Implementation Approach" (requires content field)
  • Update Notes: Use append_to_section targeting appropriate notes.md section (requires content field)
  • Extend Acceptance Criteria: Use append_to_section targeting "## Acceptance Criteria" (requires content field)

Content Removal Operations:

  • Remove Task: Use remove_list_item with exact task text (no additional fields)
  • Remove Content: Use remove_from_section with section and content to remove (requires content field)
  • Remove Section: Use remove_section with section header (no additional fields)

Read the full file on GitHub · 241 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. 4d ago First seen · 241 lines · 0 tokens per session scan A 3f69ef50fb6d

Subscribe to this mod's changes

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.