Skip to main content
Glama

contentrain_apply

Normalize content: extract entries to Contentrain files or patch source code. Dry-run preview validates changes; execute writes files and commits.

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)
dry_runNoDefaults to preview mode (dry_run:true). Set dry_run:false to execute after reviewing the preview.
extractionsNoExtract mode: content extractions
scopeNoReuse mode: scope (model or domain required)
patchesNoReuse mode: patches to apply (max 100)
Behavior5/5

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

Beyond annotations (readOnlyHint=false, destructiveHint=false), the description discloses critical behaviors: no changes on dry run, file writes and branch commits on execute, required branch health check, and that normalizes always use review workflow (no auto-merge). This fully contextualizes the tool's side effects.

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

Conciseness4/5

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

The description is well-structured: starts with purpose, then details modes, workflow, and constraints. While informative, it is slightly lengthy but every sentence adds value. No redundancy.

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 no output schema, the description explains all key behaviors (dry run vs execute, modes, constraints) but omits return format. For a tool with complex input, it covers the necessary context for an agent to use correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The description adds high-level parameter context (e.g., mode distinction, dry run default) but does not elaborate on individual parameters beyond what the schema already provides. No significant added meaning.

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 the tool applies normalize operations with two distinct modes ('extract' and 'reuse'), specifying the verb 'apply' and resource 'normalize operations'. It distinguishes from sibling tools like contentrain_content_save or contentrain_merge by focusing on a specialized workflow.

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 provides explicit usage guidance: recommends a two-step workflow (dry run then execute), explains mode selection, and mentions branch health check. However, it does not explicitly state when not to use this tool or compare directly to siblings.

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