Skip to content

Local video editor for coding agents: 42 FFmpeg tools with a machine-readable contract and an MCP server, for Claude Code, Cursor and Codex. Cut, captions, reframe, loudness, platform exports. No cloud, no API keys.

fix: MCP default tools/list is the core 12, opt-in for the full 42 (#252)

Shogo Kajiyama8b1cd9fdfd7d
diff --git a/README.md b/README.md
index 2161940..8429c4c 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ npx ffmpeg-skill
Left half is the input, right half is what the command produced. **[All 53 before/after demos, with the exact command under each one →](docs/demos.md)** — all of it generated from synthetic footage by `python3 demos/build.py`, so you can rebuild every frame of it yourself.
-`ffmpeg-skill` is an [Agent Skill](https://docs.anthropic.com/en/docs/agents-and-tools/agent-skills) for Claude Code, Cursor, Codex and any agent that reads `SKILL.md`. It teaches the agent a fixed workflow (probe → edit losslessly where possible → check → verify) and ships **42 tools** that do the actual work with `ffmpeg` / `ffprobe`: cut, join, silence removal, fit to duration and aspect, captions and karaoke, overlays and motion graphics, HDR → SDR and LUTs, audio clean-up and typed dynamics, sync with drift correction, multicam, loudness, delivery checks, whole-edit project rendering, batch folders. Every tool is also an MCP tool, and the whole set is described by a machine-readable contract.
+`ffmpeg-skill` is an [Agent Skill](https://docs.anthropic.com/en/docs/agents-and-tools/agent-skills) for Claude Code, Cursor, Codex and any agent that reads `SKILL.md`. It teaches the agent a fixed workflow (probe → edit losslessly where possible → check → verify) and ships **42 tools** that do the actual work with `ffmpeg` / `ffprobe`: cut, join, silence removal, fit to duration and aspect, captions and karaoke, overlays and motion graphics, HDR → SDR and LUTs, audio clean-up and typed dynamics, sync with drift correction, multicam, loudness, delivery checks, whole-edit project rendering, batch folders. Every tool is also callable as an MCP tool (`tools/list` advertises a core 12 by default to keep client context small, with `FFMPEG_SKILL_MCP_FULL=1` listing all 42; every tool is reachable by name through `tools/call` either way), and the whole set is described by a machine-readable contract.
If `ffmpeg` and `python3` are on your PATH, it works: offline, on footage you would rather not upload.
@@ -341,9 +341,9 @@ Next to the tool list the document carries a top-level `deprecated` list (1.10):
On Windows, `python3` is only on PATH if Python was installed from the Microsoft Store; a python.org install exposes `python` (or the `py` launcher) instead — if your MCP client reports the server failed to start, change `"command"` above to `"python"` (or the full path from `where python`).
-`mcp/server.py` is a stdio JSON-RPC transport with no tool table of its own. `tools/list` is derived from the contract at start-up: the same 42 names, the same order, and `inputSchema` translated from each tool's `input_schema`. `tools/call` maps structured arguments to argv and runs the named script; a raw `argv` form is accepted for compatibility and marked non-canonical. `python3 mcp/server.py --list` prints the tools; `--call probe '{"inputs": ["a.mp4"]}'` runs one from the shell.
+`mcp/server.py` is a stdio JSON-RPC transport with no tool table of its own. `tools/list` is derived from the contract at start-up, in contract order, with `inputSchema` translated from each tool's `input_schema`. By default it lists only the core 12 (`render`, `look`, `caption`, `export`, `check`, `fit`, `cut`, `audio`, `loudness`, `graphics`, `silence`, `probe`) so a client doesn't pay context for 30 schemas it rarely calls directly; set `FFMPEG_SKILL_MCP_FULL=1` to list all 42. Every tool, listed or not, is callable through `tools/call`, which maps structured arguments to argv and runs the named script; a raw `argv` form is accepted for compatibility and marked non-canonical. `python3 mcp/server.py --list` prints the tools; `--call probe '{"inputs": ["a.mp4"]}'` runs one from the shell.
-`FFMPEG_SKILL_MCP_LEAN=1` in the server's environment drops `json` and `progress` from every `inputSchema`: they are transport flags the server sets itself, not tool arguments, and 2.0 drops them unconditionally. It is opt-in, so the default `tools/list` stays byte-identical to the CLI surface the contract promises.
+`FFMPEG_SKILL_MCP_LEAN=1` in the server's environment drops `json` and `progress` from every `inputSchema`: they are transport flags the server sets itself, not tool arguments, and 2.0 drops them unconditionally. It is opt-in, independent of `FFMPEG_SKILL_MCP_FULL`, and the default `tools/list` stays byte-identical (aside from the core-12 filter) to the CLI surface the contract promises.
### Capability detection
diff --git a/docs/contract.md b/docs/contract.md
index 5d64d62..203e8f2 100644
--- a/docs/contract.md
+++ b/docs/contract.md
@@ -578,6 +578,18 @@ for good (see "What 2.0 changes"). The flag is opt-in and changes nothing else:
pins -- descriptions may change between releases (the `--crf` deprecation mark did) -- so a lean
client and a default client see the same tools with the same names.
+### Default `tools/list` surface: core 12, opt-in for all 42
+
+By default `tools/list` returns only the core dozen in `_contract.MCP_CORE_TOOLS` (`render`,
+`look`, `caption`, `export`, `check`, `fit`, `cut`, `audio`, `loudness`, `graphics`, `silence`,
+`probe`) rather than all 42, so a session doesn't pay context for 30 schemas it is unlikely to ever call
+directly -- the set is the tools eval iterations 17-20's ground-truth `expect` lists actually name
+most often across the corpus in `evals/agent_prompts*.json`. Every tool -- including the other 30
+-- is still callable by name through `tools/call` regardless of what `tools/list` advertised; the
+contract (`ffmpeg-skill contract --json`) still describes all 42 unconditionally. Set
+`FFMPEG_SKILL_MCP_FULL=1` (anything but "" or `0`) in the server's environment to make `tools/list`
+return all 42, as every version before 1.18.3 did.
+
## Consuming the contract from an agent
A planning agent (for example video-production-agent's SkillRegistry) can:
diff --git a/docs/design-decisions.md b/docs/design-decisions.md
index 8332fc2..73ceb9b 100644
--- a/docs/design-decisions.md
+++ b/docs/design-decisions.md
@@ -201,9 +201,11 @@ decided. Recorded here so none of it is re-proposed from scratch.
so the rule ("these are sentences, not labels") has an example next to it.
- **P1-6 — eval prompt `ml2` tested a refusal, not the mux.** Accepted: `ml2` now ships a German
SRT and a video and expects `caption|render`.
-- **P1-7 — the 42-tool MCP `tools/list` is paid for by every session.** Accepted, and moved
- **ahead of the optical-flow work into 1.18.0**: the default listing becomes the core 12, the
- rest stay reachable through the contract, which still describes all 42.
+- **P1-7 — the 42-tool MCP `tools/list` is paid for by every session.** Accepted, and **shipped**:
+ `tools/list` defaults to the core 12 (`render`, `look`, `caption`, `export`, `check`, `fit`,
+ `cut`, `audio`, `loudness`, `graphics`, `silence`, `probe`), chosen from eval iterations 17-20's
+ `expect` frequency, not taste. `FFMPEG_SKILL_MCP_FULL=1` lists all 42; the other 30 stay
+ reachable by name through `tools/call` either way, and the contract still describes all 42.
- **P1-8 — at least one routing run on a non-Claude model.** Accepted as an `evals/run.py` task:
the harness reads transcripts and files and is not Claude-specific; the routing/refusal set is
what a Cursor or Codex run would publish.
@@ -253,9 +255,10 @@ Each item is recorded here so it is not re-proposed from scratch.
1.11.1 reworded step 0 accordingly. The answer is not to make `references/` more attractive but
to make the table better: the **intent-clustered request table is planned for 1.20.0**.
- **The MCP catalogue costs a client context on every session.** A 42-tool `tools/list` is paid
- for by every session, including the ones that call two tools. Decided for **1.19.0**: the
- default listing becomes the core 12, the other 30 are reachable lazily through the contract.
- The contract still describes all 42 — the surface does not shrink, only the default listing.
+ for by every session, including the ones that call two tools. Decided and shipped in **1.18.3**:
+ the default listing becomes the core 12, the other 30 are reachable lazily through `tools/call`
+ or `FFMPEG_SKILL_MCP_FULL=1`. The contract still describes all 42 — the surface does not shrink,
+ only the default listing.
- **The roadmap read as though planned work had shipped.** Fixed: `docs/roadmap.md` now marks
every version shipped + evaluated (naming the iteration), shipped with eval pending, or
planned, and the reconciliation is against `CHANGELOG.md` and `evals/results/`.
diff --git a/mcp/server.py b/mcp/server.py
index 59b7d71..eac7311 100755
--- a/mcp/server.py
+++ b/mcp/server.py
@@ -1,10 +1,13 @@
#!/usr/bin/env python3
"""ffmpeg-skill as an MCP server (stdio, JSON-RPC 2.0) — standard library only.
-Every public script in ../scripts becomes a tool. Tool names, order, inputSchema and the
-structured-argument mapping all come from the contract (scripts/_contract.py); this file
-is only the transport. Arguments are passed as a flat object (keys = argparse dests) or,
-for CLI compatibility, as an argv list. Results are the script's --json output.
+Every public script in ../scripts becomes a callable tool, but tools/list defaults to
+advertising only the core 12 (_contract.MCP_CORE_TOOLS) to keep the schema dump small;
+set FFMPEG_SKILL_MCP_FULL=1 to list all 42. Every tool is still callable by name via
+tools/call either way. Tool names, order, inputSchema and the structured-argument mapping
+all come from the contract (scripts/_contract.py); this file is only the transport.
+Arguments are passed as a flat object (keys = argparse dests) or, for CLI compatibility,
+as an argv list. Results are the script's --json output.
Run:
python3 mcp/server.py # stdio transport
@@ -126,8 +129,18 @@ def call_tool(name: str, args: Dict[str, Any]) -> Dict[str, Any]:
def tool_list() -> List[Dict[str, Any]]:
- """tools/list: one entry per ToolSpec, in the contract's order, inputSchema derived from ToolSpec.input_schema."""
- return [_contract.mcp_tool(spec) for spec in specs().values()]
+ """tools/list: one entry per ToolSpec, in the contract's order, inputSchema derived from ToolSpec.input_schema.
+
+ Default surface is the core 12 (_contract.MCP_CORE_TOOLS, roadmap P1-7): the other 30 stay
+ reachable by name through tools/call regardless. FFMPEG_SKILL_MCP_FULL=1 (anything but "" or
+ "0") lists all 42, unchanged from pre-1.18.3 behaviour.
+ """
+ all_specs = specs()
+ if os.environ.get("FFMPEG_SKILL_MCP_FULL", "") not in ("", "0"):
+ names = all_specs.keys()
+ else:
+ names = (n for n in all_specs if n in _contract.MCP_CORE_TOOLS)
+ return [_contract.mcp_tool(all_specs[name]) for name in names]
def handle(req: Dict[str, Any]) -> Dict[str, Any]:
diff --git a/scripts/_contract.py b/scripts/_contract.py
index 2a6bb52..8f8076a 100644
--- a/scripts/_contract.py
+++ b/scripts/_contract.py
@@ -1075,6 +1075,15 @@ MCP_JSON_EXEMPT = ("look", "probe")
# itself, not tool arguments. Off by default so tools/list stays byte-identical to the CLI surface
# the contract promises; 2.0 drops them unconditionally.
MCP_LEAN_DROP = ("json", "progress")
+# default MCP tools/list surface (roadmap P1-7, shipped 1.18.3): the 42-tool schema dump costs
+# every MCP session context whether it needs it or not. These 12 are the tools eval iterations
+# 17-20's ground-truth `expect` lists actually name most often across the 118 agent prompts in
+# evals/agent_prompts*.json (render/look/caption/export/check each >=10 hits; fit/cut/audio/
+# loudness/graphics/silence/probe each >=6) -- not a hand-picked "starter" set. `tools/list`
+# returns only these unless FFMPEG_SKILL_MCP_FULL=1 (anything but "" or "0") asks for all 42; the
+# other 30 stay reachable by name through tools/call either way, and `contract --json` always
+# describes all 42.
+MCP_CORE_TOOLS = ("render", "look", "caption", "export", "check", "fit", "cut", "audio", "loudness", "graphics", "silence", "probe")
MCP_STRUCTURED_NOTE = ("Structured arguments: keys are the input_schema property names (argparse dests), positionals "
"are passed by name, output -> -o. Or argv: the raw CLI list (non-canonical; all other keys are then ignored). "
"Media paths must be absolute.")
diff --git a/tests/test_contract.py b/tests/test_contract.py
index febe074..9b6cb78 100644
--- a/tests/test_contract.py
+++ b/tests/test_contract.py
@@ -801,19 +801,44 @@ class ContractTests(unittest.TestCase):
# ------------------------------------------------------------------ consistency: MCP and installer
def test_mcp_tools_match_contract(self):
- mcp_names = [t["name"] for t in mcp_server.tool_list()]
- self.assertEqual(sorted(mcp_names), sorted(self.tools), "MCP tools/list == contract tools")
- listed = [l.split()[0] for l in sh(sys.executable, ROOT / "mcp" / "server.py", "--list").stdout.splitlines() if l.strip()]
- self.assertEqual(sorted(listed), sorted(self.tools))
+ """FFMPEG_SKILL_MCP_FULL=1 is the escape hatch back to the pre-1.18.3 behaviour: every
+ contract tool listed. This test proves that view is still byte-for-byte the full set."""
+ saved = os.environ.get("FFMPEG_SKILL_MCP_FULL")
+ os.environ["FFMPEG_SKILL_MCP_FULL"] = "1"
+ try:
+ mcp_names = [t["name"] for t in mcp_server.tool_list()]
+ self.assertEqual(sorted(mcp_names), sorted(self.tools), "MCP tools/list (full) == contract tools")
+ listed = [l.split()[0] for l in sh(sys.executable, ROOT / "mcp" / "server.py", "--list", env={**os.environ}).stdout.splitlines() if l.strip()]
+ self.assertEqual(sorted(listed), sorted(self.tools))
+ finally:
+ os.environ.pop("FFMPEG_SKILL_MCP_FULL", None)
+ if saved is not None:
+ os.environ["FFMPEG_SKILL_MCP_FULL"] = saved
for name, spec in self.tools.items():
self.assertEqual(spec["mcp"]["tool"], name)
self.assertEqual(spec["mcp"]["positional"], mcp_server.POSITIONAL.get(name, ["input"]) if spec["mcp"]["positional"] else spec["mcp"]["positional"])
- # a real JSON-RPC round trip
- req = json.dumps({"jsonrpc": "2.0", "id": 1, "method": "tools/list"}) + "\n"
- proc = subprocess.run([sys.executable, str(ROOT / "mcp" / "server.py")], input=req, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
- resp = json.loads(proc.stdout.strip().splitlines()[0])
+ # a real JSON-RPC round trip, full surface
+ resp = self._rpc([{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}], full=True)[0]
self.assertEqual(sorted(t["name"] for t in resp["result"]["tools"]), sorted(self.tools))
+ def test_mcp_tools_list_defaults_to_the_core_12(self):
+ """roadmap P1-7 (docs/design-decisions.md): tools/list defaults to _contract.MCP_CORE_TOOLS,
+ in contract order, not all 42 -- and every one of those 12 is a real contract tool. The
+ other 30 stay reachable through tools/call (proved by test_mcp_schema_drift_follows_the_scripts
+ and test_mcp_server_error_paths_raw_argv_and_call_helper calling non-core tools directly)."""
+ self.assertEqual(len(_contract.MCP_CORE_TOOLS), 12)
+ self.assertTrue(set(_contract.MCP_CORE_TOOLS).issubset(self.tools), "every core tool is a real contract tool")
+ expected_order = [n for n in self.tools if n in _contract.MCP_CORE_TOOLS]
+ mcp_names = [t["name"] for t in mcp_server.tool_list()]
+ self.assertEqual(mcp_names, expected_order, "default MCP tools/list is the core 12, in contract order")
+ resp = self._rpc([{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}])[0]
+ self.assertEqual([t["name"] for t in resp["result"]["tools"]], expected_order, "JSON-RPC round trip matches")
+ for flag in ("0", ""):
+ resp = self._rpc([{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}], full=False)[0]
+ self.assertEqual([t["name"] for t in resp["result"]["tools"]], expected_order, f"FFMPEG_SKILL_MCP_FULL={flag!r} still core 12")
+ listed = [l.split()[0] for l in sh(sys.executable, ROOT / "mcp" / "server.py", "--list").stdout.splitlines() if l.strip()]
+ self.assertEqual(listed, expected_order)
+
def test_mcp_tool_surface_matches_the_frozen_1x_snapshot(self):
"""docs/contract.md, "Stability guarantee (1.x)": within 1.x no tool is removed or renamed
and no argument is removed, renamed or made newly required. The MCP surface is *derived*
@@ -823,12 +848,21 @@ class ContractTests(unittest.TestCase):
Adding a tool or an optional argument is allowed and must be reflected by regenerating the
snapshot (UPDATE_MCP_SNAPSHOT=1 python3 tests/test_contract.py); removing or renaming
anything, or making an argument required, is a breaking change and belongs behind the
- deprecation policy and a major bump, not behind a regenerated fixture."""
+ deprecation policy and a major bump, not behind a regenerated fixture. The snapshot covers
+ all 42 tools, so this reads tool_list() under FFMPEG_SKILL_MCP_FULL=1 -- the default's
+ core-12 filter is a separate, tested concern (test_mcp_tools_list_defaults_to_the_core_12)."""
snapshot_path = ROOT / "tests" / "fixtures" / "mcp_tools.json"
- live = [{"name": t["name"],
- "properties": sorted(t["inputSchema"].get("properties", {}).keys()),
- "required": sorted(t["inputSchema"].get("required", []))}
- for t in mcp_server.tool_list()]
+ saved = os.environ.get("FFMPEG_SKILL_MCP_FULL")
+ os.environ["FFMPEG_SKILL_MCP_FULL"] = "1"
+ try:
+ live = [{"name": t["name"],
+ "properties": sorted(t["inputSchema"].get("properties", {}).keys()),
+ "required": sorted(t["inputSchema"].get("required", []))}
+ for t in mcp_server.tool_list()]
+ finally:
+ os.environ.pop("FFMPEG_SKILL_MCP_FULL", None)
+ if saved is not None:
+ os.environ["FFMPEG_SKILL_MCP_FULL"] = saved
if os.environ.get("UPDATE_MCP_SNAPSHOT"):
snapshot_path.write_text(json.dumps(live, indent=1) + "\n", encoding="utf-8")
frozen = json.loads(snapshot_path.read_text(encoding="utf-8"))
@@ -892,9 +926,14 @@ class ContractTests(unittest.TestCase):
self.assertIn(surface, wheres)
# ------------------------------------------------------------------ MCP inputSchema derived from the contract
- def _rpc(self, requests, root=ROOT):
+ def _rpc(self, requests, root=ROOT, full=False):
text = "".join(json.dumps(r) + "\n" for r in requests)
- proc = subprocess.run([sys.executable, str(Path(root) / "mcp" / "server.py")], input=text, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
+ env = dict(os.environ)
+ if full:
+ env["FFMPEG_SKILL_MCP_FULL"] = "1"
+ else:
+ env.pop("FFMPEG_SKILL_MCP_FULL", None)
+ proc = subprocess.run([sys.executable, str(Path(root) / "mcp" / "server.py")], input=text, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, env=env)
self.assertEqual(proc.returncode, 0, proc.stderr)
return [json.loads(line) for line in proc.stdout.strip().splitlines()]
@@ -903,7 +942,7 @@ class ContractTests(unittest.TestCase):
return json.dumps(obj, sort_keys=True, separators=(",", ":"))
def test_mcp_input_schema_equals_translated_contract_schema(self):
- listed = self._rpc([{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}])[0]["result"]["tools"]
+ listed = self._rpc([{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}], full=True)[0]["result"]["tools"]
self.assertEqual([t["name"] for t in listed], [t["name"] for t in self.contract["tools"]], "MCP order == contract order")
for entry in listed:
spec = self.tools[entry["name"]]
@@ -949,7 +988,7 @@ class ContractTests(unittest.TestCase):
(root / "scripts" / "cut.py").unlink()
# a new public script without metadata is reported, not silently dropped or guessed
(root / "scripts" / "zzztool.py").write_text("#!/usr/bin/env python3\nimport argparse\ndef main():\n argparse.ArgumentParser().parse_args()\nif __name__ == '__main__':\n main()\n", encoding="utf-8")
- err = self._rpc([{"jsonrpc": "2.0", "id": 0, "method": "tools/list"}], root=root)[0]
+ err = self._rpc([{"jsonrpc": "2.0", "id": 0, "method": "tools/list"}], root=root, full=True)[0]
self.assertIn("no TOOL_META entry", err["error"]["message"])
contract_py = (root / "scripts" / "_contract.py").read_text(encoding="utf-8")
contract_py = contract_py.replace('TOOL_META: Dict[str, Dict[str, Any]] = {', 'TOOL_META: Dict[str, Dict[str, Any]] = {\n "zzztool": dict(role="analysis", inputs=["x"], outputs=["y"], required=["ffprobe"], optional=[], video_required=False, audio_only=True, visual=False, verify=[], produces_artifact=False, idempotency="bit_exact", deterministic=True),', 1)
@@ -964,13 +1003,22 @@ class ContractTests(unittest.TestCase):
fit = (root / "scripts" / "fit.py").read_text(encoding="utf-8")
fit = fit.replace(' add_common(ap)', ' ap.add_argument("--drift-flag", action="store_true", help="added for the drift test")\n add_common(ap)', 1)
(root / "scripts" / "fit.py").write_text(fit, encoding="utf-8")
- tools = {t["name"]: t for t in self._rpc([{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}], root=root)[0]["result"]["tools"]}
+ tools = {t["name"]: t for t in self._rpc([{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}], root=root, full=True)[0]["result"]["tools"]}
self.assertNotIn("cut", tools, "removed script still exposed")
self.assertIn("zzztool", tools, "new public script not exposed")
self.assertEqual(tools["zzztool"]["inputSchema"]["properties"]["knob"], {"type": "integer", "description": "a knob", "enum": [1, 2, 3], "default": 3})
self.assertIn("drift_flag", tools["fit"]["inputSchema"]["properties"], "parser change not reflected")
self.assertEqual(list(tools), sorted(tools), "order stays sorted after changes")
- # the temporary tool also runs through the derived mapping
+ # the same drift, seen through the default core-12 view: zzztool never joins it (it
+ # isn't in MCP_CORE_TOOLS), the removed "cut" stays gone, and a core tool's parser
+ # change ("fit") still reaches it -- both views are derived from the same live scripts.
+ core = {t["name"]: t for t in self._rpc([{"jsonrpc": "2.0", "id": 4, "method": "tools/list"}], root=root)[0]["result"]["tools"]}
+ self.assertNotIn("cut", core, "removed script still exposed in the core-12 view")
+ self.assertNotIn("zzztool", core, "a non-core new script must not appear in the default view")
+ self.assertIn("drift_flag", core["fit"]["inputSchema"]["properties"], "parser change not reflected in the core-12 view")
+ self.assertEqual(set(core) - {"cut"}, set(_contract.MCP_CORE_TOOLS) - {"cut"}, "core-12 view is exactly MCP_CORE_TOOLS minus the removed script")
+ # the temporary tool also runs through the derived mapping (tools/call reaches it even
+ # though it is outside the default tools/list view)
call = self._rpc([{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "zzztool", "arguments": {"input": "x", "knob": 2}}}], root=root)[0]
self.assertEqual(call["result"]["structuredContent"]["knob"], 2)
unknown = self._rpc([{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "_contract", "arguments": {}}}], root=root)[0]
diff --git a/tests/test_orchestration.py b/tests/test_orchestration.py
index e26e5ac..6cbf1cf 100644
--- a/tests/test_orchestration.py
+++ b/tests/test_orchestration.py
@@ -843,7 +843,9 @@ class OrchestrationTests(MediaFixtures):
def test_brand_defaults_apply_to_caption_and_logo(self):
brand = OUT / "brand.json"
if not brand.exists():
- self.test_graphics_templates()
+ brand.write_text(json.dumps({"font": "DejaVu Sans", "colors": {"primary": "FF6A00", "text": "FFFFFF", "background": "0B1D2A"},
+ "logo": "logo.png", "logo_position": "top-right", "logo_scale": 140, "safe_margin": 40,
+ "caption": {"size": 28, "position": "bottom", "animate": "pop", "karaoke": True, "bold": True}}), encoding="utf-8")
ass = OUT / "brand.ass"
script("caption.py", self.src, "--text", self.cues, "--brand", brand, "--write-ass", ass, "--fast", "-o", OUT / "brand_cap.mp4")
style = [l for l in ass.read_text(encoding="utf-8-sig").splitlines() if l.startswith("Style:")][0]
@@ -868,7 +870,11 @@ class OrchestrationTests(MediaFixtures):
{"jsonrpc": "2.0", "id": 6, "method": "tools/call", "params": {"name": "nope", "arguments": {}}},
{"jsonrpc": "2.0", "id": 7, "method": "bogus/method"},
]
- proc = subprocess.run([sys.executable, str(server)], input="\n".join(json.dumps(r) for r in reqs) + "\n", stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
+ # FFMPEG_SKILL_MCP_FULL=1: this test is about the stdio wiring (initialize / tools/list /
+ # tools/call / unknown name / unknown method), not the core-12-by-default filter, which
+ # has its own tests in tests/test_contract.py.
+ env = {**os.environ, "FFMPEG_SKILL_MCP_FULL": "1"}
+ proc = subprocess.run([sys.executable, str(server)], input="\n".join(json.dumps(r) for r in reqs) + "\n", stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, env=env)
self.assertEqual(proc.returncode, 0, proc.stderr)
resp = {r["id"]: r for r in (json.loads(l) for l in proc.stdout.splitlines() if l.strip())}
self.assertEqual(resp[1]["result"]["serverInfo"]["name"], "ffmpeg-skill")