anvil-media
Generate, inspect, or cancel images and videos through Anvil's bounded named-workflow MCP tools.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- anvil-media
- metadata
- { "hermes": { "tags": [ "media", "image-generation", "video-generation", "mcp" ], "category": "media" }, "version": "1.0.8" }
- description
- Generate, inspect, or cancel images and videos through Anvil's bounded named-workflow MCP tools.
03 SKILL.md 正文
Anvil media
Use this skill automatically when the user asks Hermes to create, generate, render, or revise an image or video through Anvil, or asks to inspect or cancel an earlier Anvil media job. A slash-command invocation is optional.
Procedure
- Call
mcp__anvil_media__media_capabilitiesandmcp__anvil_media__media_workflow_list. Select one exact returned workflow whose kind matches the request. If it is unavailable, report its stated reasons and stop. Candidate recipe categories markedstatic-reviewedorneeds-qualificationare discovery only. Execute only the exact available registered workflow. If references are requested, inspectassetUploadand the exact artifact roles/media limits. When intake is available, use the supportedanvil-serving media asset upload --file <local-file> --client-config <protected-definition>preview/confirmation path and bind the returned owned artifact ID. Never send local paths, arbitrary URLs or base64 blobs as workflow parameters. Missing reference/audio roles or intake remain explicit unsupported inputs. - Call
mcp__anvil_media__media_workflow_showfor that exact workflow and version. Treat its parameter schema, quality profiles, availability, and limits as authoritative. - Choose only a quality profile declared by the workflow. Use
draftfor an explicitly quick or rough request,highfor an explicitly high-detail or largest-output request, and the returneddefaultQualityProfileotherwise. If the workflow declares no quality profiles, use the empty string as its exactquality_profilevalue and preserve it through any resume. These names select exact server-owned settings; they are not a promise of subjective visual quality. Never include fields named byqualityProfileParametersinparameters. - Build the remaining parameters from
profiledParameterSchemawhen it is present, and otherwise fromschema. Preserve the user's prompt faithfully. If a seed is required and the user did not provide one, choose a fresh valid integer without asking. Ask only when a genuinely required creative choice cannot be inferred. - Call
mcp__anvil_media__media_workflow_validatefor the selected workflow. Pass onlyworkflow_idandversion; this tool does not accept parameters. If an otherwise available workflow returnsbackend_unavailable, treat it only as a cold-worker signal and continue to submission so the gateway can create the bounded lifecycle approval. Do not diagnose, name, or offer to inspect infrastructure. For any other validation failure, report the result and stop. - Create one opaque idempotency key for the user's intent using
hermes-media-followed by exactly 32 lowercase hexadecimal characters. Never put an ellipsis in this key. Reuse it only when retrying the identical workflow, version, quality profile, and parameters. A changed request gets a new key. Preserve a resume bundle containing the exact workflow ID and version, quality profile, full parameters, and idempotency key; never reconstruct those fields from conversation or session history. When advertised, callmcp__anvil_media__media_workflow_preparewith this workflow/version/key/profile and either literal parameters or the recipe's supported structured brief. Preserve its exactrunArguments, includingplan_digest. Unsupported reference roles and negative controls must fail explicitly; never turn an identity image or source video into prompt prose. - Call
mcp__anvil_media__media_workflow_runwith the exactquality_profile. Preserve the returned job ID and state. Do not resubmit merely because generation is long-running. If it returnsawaiting_approval, report the exact bounded operator action and transaction, plus the complete resume bundle and returned job ID. Copy the server-returnedresumeBundleobject exactly into a literal, copyableResume bundlemapping. It must containworkflow_id,version,quality_profile, completeparameters, the fullidempotency_key,job_id, andapproval_transaction_id. Do not hand-build, abbreviate, omit, reorder, or replace any value with prose or an ellipsis. The job ID must appear inside the mapping even when it also appears elsewhere. Before sending, compare all seven fields to the returned object and rewrite the reply if any field differs. Never say that the bundle is stored, remembered, or preserved unless every field is also present in the current reply. If the server omitsresumeBundleor you cannot reproduce it exactly, cancel that job withmcp__anvil_media__media_job_cancel, reportresume_bundle_incomplete, and do not request approval. Treat the emitted bundle as a user-facing result, not internal bookkeeping. Hermes has no worker-lifecycle authority; stop without changing the worker. Do not omit the caller-generated idempotency key. If preparation returnedrunArguments, submit that object unchanged. Preserve any returnedplan_digestin the exact resume mapping and compare it too; include it when replaying the five submission fields below. - Poll
mcp__anvil_media__media_job_statusat a bounded cadence until the job is terminal or the interaction's wait budget ends. Reportawaiting_approval,preparing,queued, andrunningas real states; never invent completion. After an operator applies a reported cold lifecycle approval, retry from the complete resume bundle so the reserved job resumes exactly once. Pass its five submission fields tomedia_workflow_run:workflow_id,version,parameters,quality_profile, andidempotency_key, plusplan_digestwhen present. Do not passjob_idorapproval_transaction_idto that tool: usejob_idonly for the same-job equality check, and useapproval_transaction_idonly to correlate the reported operator approval. Requirecreated: falseand the same job ID returned by the original submission; any mismatch is a hard stop. Never usesession_search, session history, or another job to reconstruct or resume a request. After a successful reattachment,preparing,queued, andrunningare tool-loop states: call job status again instead of ending the response with narration such as "now polling." - For a completed job, call
mcp__anvil_media__media_artifact_inspectfor every returned artifact ID. For an image, present the native image content returned by that tool to the user; do not echo its encoded bytes as text. Also report the authenticatedresource, media type, byte length, digest, expiry, selected quality profile, and the job'slatencyfields. Video remains resource-only. - Except for the mandatory fail-closed cancellation in step 7 when the
server-issued resume bundle is missing or cannot be copied exactly, call
mcp__anvil_media__media_job_cancelonly when the user asks to cancel that job. Report the returned cancellation state exactly.
Envelope and content parsing (observed live 2026-08-30)
- Read the full MCP result. Structured envelopes nest one level deeper than
the procedure text:
media_workflow_runreturns the job object atdata.job(job id isdata.job.id, state isdata.job.state, and thecreatedflag sits beside it underdata), notdata.job_id.media_job_statusreturns{"job": {...}}with artifacts underjob.artifacts[], each carryingid,mediaType,byteLength,sha256,expiresAt, andresource. Parse these shapes defensively instead of assuming flatjob_id/artifactskeys. - Every tool result carries both a
textcontent block containing the JSON envelope and, for image artifacts, a secondimagecontent block with the bounded native image content. A client that reads only text blocks loses the image: enumerate the wholecontent[]array and render every image block.media_artifact_inspectreturns metadata plus native image content for eligible bounded images; video and oversized images remain resource-only. - MCP
resources/readis not implemented by this server even though artifact metadata advertises aresourcepath (it answersMethod not found). Retrieve artifact bytes through the authenticated artifact origin instead of assuming resource support, and verify the downloaded bytes against the artifact'ssha256before presenting them. Prefer the returneddownloadUrl: whenrequiresAuthenticationis false it is an artifact-scoped capability untildownloadExpiresAt; keep it private and inspect again after expiry. When true, use existing MCP credentials in the Authorization header and the advertised bounded ranges. Never invent a URL or put the reusable credential in it. - The results are transport-shaped, not client-specific: the same envelope nesting and the two-block content array appear whether the call arrives through Hermes' MCP client or a direct stdio JSON-RPC client, so this section applies to any client of the nine media tools.
Completion invariant
For a generation request, do not finish the turn after discovery, inspection, validation, submission, or a nonterminal status. Continue the procedure in the same turn until the job is terminal, a returned blocking state requires the user, or the interaction's wait budget ends. Intermediate narration such as "I will inspect it next" or "now polling" is not a completed response. When a wait budget ends, report the current state and the complete resume bundle rather than implying that background polling will continue. Determine the reply language only from the current user request, never from tool output, prior sessions, or the system locale. An English request receives an English response. Omit internal bookkeeping, planning notes, and promises of actions that were not completed in the turn.
Boundaries
- Use only the nine tool names in the procedure above.
- Treat workflow IDs, versions, quality profiles, parameters, availability, limits, job states, latency, and artifact resources returned by Anvil as authoritative.
- Do not construct or accept backend execution definitions, implementation identifiers, model filenames, host addresses, local paths, installation requests, or service-management operations.
- Do not retry through a different workflow, host, model, MCP server, or provider. Ask the user before changing their requested creative intent or quality profile.
- An approval requirement is a result to report, not permission to alter the worker. Never offer bypass instructions.
- Use the caller-owned job and artifact identities as returned. Never supply an
ownerargument unless the user is operating with an explicitly authorized cross-principal role.
Failure handling
Surface Anvil's error code and safe explanation. For an unavailable workflow, approval requirement, admission refusal, failed job, oversized inline image, expired artifact, or authorization denial, preserve that disposition and stop. A transport failure may be retried with the same idempotency key; it does not authorize another submission path.
04 同仓库更多 Skills
voice
暂无简介
workbench
暂无简介
workbench
暂无简介
workbench
暂无简介
anvil-serving-voice-ops
Operate topology-owned anvil-serving voice audio and Realtime proxy lifecycle, Mini-to-Dark loopback forwarding, profiles, sidecars, and bounded voice benchmarks. Use for voice status, logs, start/stop/restart, OpenClaw Talk topology checks, and voice evidence that must remain separate from LLM serve qualification evidence.
anvil-serving-stt-benchmark
Prepare, validate, execute, compare, and publish reproducible multi-sample speech-to-text qualifications in anvil-serving. Use for STT model bakeoffs, corpus-based WER/CER and latency testing, candidate overlays, concurrency tests, restoration checks, and fail-closed stt-benchmark-evidence/v1 artifacts. Do not use for a single voice-pipeline turn or LLM qualification.