Skip to main content
Glama

contentrain_apply

Apply normalize operations in extract or reuse mode. Preview changes with dry run before writing files and committing to a branch.

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?

Beyond annotations (readOnlyHint=false, destructiveHint=false), the description adds critical behavioral details: dry run does nothing to disk, execute writes and commits, requires branch health check, and never auto-merges. This fully discloses the tool's side effects and safety workflow.

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?

Description is well-structured: starts with a brief summary, then explains modes, then workflow. Every sentence provides necessary information without redundancy. It is concise yet comprehensive.

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

Completeness4/5

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

Given the tool's complexity (multiple modes, nested parameters, no output schema), the description covers the core workflow and key behaviors. Minor gaps: no explanation of error handling or what 'branch health check' entails, but overall sufficient for an agent to use effectively.

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?

Input schema has 100% description coverage, so baseline is 3. The description adds value by explaining the dry_run default, the workflow context, and the distinction between modes, which enhances understanding beyond the schema alone.

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?

Description clearly states 'Apply normalize operations' and distinguishes two modes (extract and reuse) with specific verbs and resources. It differentiates from sibling tools by focusing on normalize operations, making it unambiguous what the tool does.

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?

Provides explicit recommended workflow (dry run first, then execute) and describes when to use each mode. However, it does not mention when to avoid this tool or compare to alternatives like contentrain_bulk or contentrain_content_save, leaving some ambiguity.

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