Skip to main content
Glama
Frontmatter MCP

Frontmatter MCP

by kzmshx

Batch Array Add

batch_array_add

Adds a value to an array property across multiple Markdown files matching a glob pattern, with duplicate skipping by default.

Instructions

Add a value to an array property in multiple files.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "glob": "<glob>",
      "property": "<property>",
      "value": "<value>"
    },
    "name": "batch_array_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
globYesGlob pattern relative to base directory (e.g. "atoms/**/*.md").
valueYesValue to add. If value is an array, it's added as a single element.
propertyYesName of the array property.
allow_duplicatesNoIf False (default), skip files where value already exists.

Output Schema

NameRequiredDescriptionDefault
warningsNo
updated_countYes
updated_filesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.7.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / allow_duplicates / description
      Added value: +"If False (default), skip files where value already exists."
    • addedInput schema / properties / glob / description
      Added value: +"Glob pattern relative to base directory (e.g. \"atoms/**/*.md\")."
    • addedInput schema / properties / property / description
      Added value: +"Name of the array property."
    • addedInput schema / properties / value / description
      Added value: +"Value to add. If value is an array, it's added as a single element."
    • removedInput schema / properties / value / title
      Removed value: -"Value"
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / properties
      Added value: +{
      +  "updated_count": {
      +    "type": "integer"
      +  },
      +  "updated_files": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "warnings": {
      +    "items": {
      +      "description": "A file that was skipped or only partly used, and why.",
      +      "properties": {
      +        "error": {
      +          "type": "string"
      +        },
      +        "path": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "path",
      +        "error"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "updated_count",
      +  "updated_files"
      +]
  2. First observedv0.5.3

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it does convey that this is a bulk mutation across many files. However it says nothing about what happens to files lacking the property, whether writes are reversible, permissions needed, or the duplicate-skipping behavior (that lives only in the schema). For a multi-file write operation with zero annotation coverage this is thin.

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?

One sentence with zero filler and the action front-loaded, which is easy to scan. Brevity tips into under-specification, but no sentence is wasted.

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?

An output schema exists and the input schema is fully documented, so the agent can form correct calls from structured data alone. For a bulk mutation with no annotations, the description could still note side effects on non-matching files, keeping it just short of full marks.

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 glob, property, value, and allow_duplicates are already documented in detail, including the array-as-single-element rule and duplicate skipping. The description adds nothing beyond that, so baseline 3 applies.

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

Purpose4/5

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

States a concrete verb (add), resource (a value to an array property), and scope (multiple files via a glob), which implicitly distinguishes it from sibling operations like batch_array_remove, batch_array_replace, batch_array_sort and batch_array_unique. It lacks an explicit contrast with those siblings, but the action is unambiguous.

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

Usage Guidelines2/5

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

There is no guidance on when to use this vs update, batch_update, or the other batch_array_* tools, nor any stated prerequisite such as required file structure or property existence. The only implicit cue is the multiple-files scope.

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