Skip to main content
Glama

contentrain_apply

Apply approved content extractions or source patches to Contentrain files, using a dry-run preview to validate changes before executing them on disk and git.

Instructions

Apply normalize operations. Two modes: "extract" writes agent-approved strings to Contentrain content files (source untouched), "reuse" patches source files with agent-provided replacement expressions. DRY RUN (default, dry_run:true): validates inputs, resolves conflicts, and returns a full preview — NO changes to disk or git. EXECUTE (dry_run:false): writes files to disk, commits to a branch, and requires branch health check to pass. Recommended workflow: always run dry_run first, review the preview, then call again with dry_run:false to execute. Normalize operations always use review workflow (never auto-merge).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesApply mode: extract (content creation) or reuse (source patching)
scopeNoReuse mode: scope (model or domain required)
dry_runNoDefaults to preview mode (dry_run:true). Set dry_run:false to execute after reviewing the preview.
patchesNoReuse mode: patches to apply (max 100)
extractionsNoExtract mode: content extractions
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses significant behavioral details beyond annotations, such as 'DRY RUN... NO changes to disk or git' and 'EXECUTE... writes files to disk, commits to a branch, and requires branch health check to pass.' It also specifies that extract mode leaves source untouched while reuse patches source files, providing clear side-effect information.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is five sentences, each conveying essential info: the tool's purpose, mode differentiation, dry run vs execution behavior, recommended workflow, and the never-auto-merge policy. No filler or redundancy; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the tool's operational lifecycle, including preview and execution phases, branch health check requirement, and the review workflow. Given the complexity of the tool with nested parameters, it provides a comprehensive high-level understanding, augmented by the schema's detailed parameter descriptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage for all parameters with detailed descriptions. The description adds overarching semantics by explaining how the `mode` parameter selects between `extractions` and `patches`, and how `dry_run` controls the preview-vs-execute behavior, complementing the schema's per-parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that this tool applies normalize operations with two distinct modes ('extract' and 'reuse'), and details what each does, distinguishing it from sibling tools like contentrain_validate or contentrain_merge. The verb 'Apply' and resource 'normalize operations' are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly recommends a workflow: 'always run dry_run first, review the preview, then call again with dry_run:false to execute.' It also clarifies that normalize operations always use a review workflow and never auto-merge. However, it does not explicitly name alternative tools or state when not to use this tool, so it stops short of a perfect 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Contentrain/ai'

If you have feedback or need assistance with the MCP directory API, please join our Discord server