video-research-mcp / src
AGENTS.md23 starsChanged 38 days agoMITView on GitHub
Applies to source files under src/. - Tools are async functions and should stay directly callable. - Do not add FastMCP 2.x compatibility code. - Generative tools return dict values; serialize Pydantic models using model_dump(). - Native media tools may return mcp.types.CallToolResult with typed structuredContent, a JSON text block, and bounded ImageContent. Declare an explicit success/error output schema and offer the same metadata without images. Existing tools keep their published return contracts. - Never let tool exceptions escape; return make_tool_error()…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- av-eventsSkill
- creative-concept-designSkill
- educational-explainerSkill
- ffmpeg-productionSkill
- footage-editSkill
- gemini-visualizeSkill
- gr-advisorSkill
- hardware-evidence-captureSkill
- image-generationSkill
- mlflow-tracesSkill
- movie-commentarySkill
- plugin-maintenanceSkill
- qwen-image-integrationSkill
- qwen-video-integrationSkill
- research-brief-builderSkill
- research-visualization-blenderSkill
- research-visualization-freecadSkill
- reverse-search-video-frameSkill
- spatial-video-analysisSkill
- tts-productionSkill
- video-explainerSkill
- video-generationSkill
- video-productionSkill
- video-researchSkill
- video-to-skillSkill
- video-translationSkill
- weaviate-setupSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
14 rules. About 0 are common, 1 is distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Use one FastMCP instance per sub-server, mounted on the root app.
- Very specific: line 9
Import ToolAnnotations from mcp.types (not from fastmcp).
- Very specific: line 10
Use lifespan via @asynccontextmanager when needed.
- Distinctive: line 15
Do not add FastMCP 2.x compatibility code.
- Very specific: line 21
Never let tool exceptions escape.
- Very specific: line 22
All tools must have @trace(name="tool_name", span_type="TOOL") decorator — no-op when mlflow not installed.
- Very specific: line 26
Use Annotated[type, Field(description="...")] for parameters.
- Very specific: line 27
Use ThinkingLevel alias for thinking depth fields.
- Very specific: line 28
Prefer optional params with defaults over required params set to None.
- Very specific: line 32
Use the singleton GeminiClient.get().
- Very specific: line 37
Use async generation via client.aio.models.generate_content().
- Very specific: line 38
Import SDK types from google.genai import types.
- Very specific: line 48
Keep defensive attribute checks such as getattr(..., "thought", False) and grounding metadata checks.
- Very specific: line 49
Use cached content in GenerateContentConfig.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md (src scope)
Applies to source files under src/.
FastMCP Patterns (v4.x)
- Use one
FastMCPinstance per sub-server, mounted on the root app. - Register tools with
@server.tool(annotations=ToolAnnotations(...)). - Import
ToolAnnotationsfrommcp.types(not fromfastmcp). - Use lifespan via
@asynccontextmanagerwhen needed.
Tool Function Rules
- Tools are async functions and should stay directly callable.
- Do not add FastMCP 2.x compatibility code.
- Generative tools return
dictvalues; serialize Pydantic models usingmodel_dump(). - Native media tools may return
mcp.types.CallToolResultwith typedstructuredContent, a JSON text block, and boundedImageContent. Declare an explicit success/error output schema and offer the same metadata without images. Existing tools keep their published return contracts. - Never let tool exceptions escape; return
make_tool_error()instead. - All tools must have
@trace(name="tool_name", span_type="TOOL")decorator — no-op when mlflow not installed.
Parameter Rules
- Use
Annotated[type, Field(description="...")]for parameters. - Use
ThinkingLevelalias for thinking depth fields. - Prefer optional params with defaults over required params set to
None.
Google GenAI SDK Patterns
- Use the singleton
GeminiClient.get(); do not instantiategenai.Client()directly. - Route generation through
GeminiClient.generate(),.generate_structured(), or.generate_json_validated(). - Deterministic local operations validate typed inputs/results directly and do not invoke Gemini. Optional external MCPs run separately and use their own schemas; they must not add provider/runtime requirements to core startup.
- Use async generation via
client.aio.models.generate_content(). - Import SDK types from
google.genai import types.
Key usage:
types.Part,types.Content,types.GenerateContentConfig,types.ThinkingConfig- Video parts via
types.Part.from_uri(file_uri=..., mime_type=...)
Thinking and Caching
- Include
ThinkingConfig(thinking_level=...)through project config. - The default model supports
low,medium,high; reject unsupportedminimalwith an actionable validation error. - Keep defensive attribute checks such as
getattr(..., "thought", False)and grounding metadata checks. - Use cached content in
GenerateContentConfig; prewarm and lookup through context cache helpers.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

