Skip to main content
Glama
Frontmatter MCP

Frontmatter MCP

by kzmshx

Batch Array Unique

batch_array_unique

Remove duplicate values from a specified array property across multiple Markdown files matched by a glob pattern, keeping each list unique.

Instructions

Remove duplicate values from 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>"
    },
    "name": "batch_array_unique"
  }
}

Input Schema

NameRequiredDescriptionDefault
globYesGlob pattern relative to base directory (e.g. "atoms/**/*.md").
propertyYesName of the array property.

Output Schema

NameRequiredDescriptionDefault
warningsNo
updated_countYes
updated_filesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.7.0
    • addedInput schema / additionalProperties
      Added value: +false
    • 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."
    • 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

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies a bulk mutation ('in multiple files') but does not disclose which duplicate is retained (first/last), whether order is preserved, whether writes are atomic, what permissions are required, or what happens on partial failure. The presence of an output schema covers return values, but the mutation traits remain unspecified.

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?

A single, front-loaded sentence with zero wasted words. The operation and scope are stated immediately, making it easy to scan.

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

Completeness2/5

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

For a tool that mutates multiple files with no annotations, the description is too thin. It should cover behavioral traits such as deduplication order, failure semantics, or write behavior, especially since bulk mutation carries meaningful risk. The output schema and full parameter coverage reduce some burden, but the mutation profile is incomplete.

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%, with both 'glob' and 'property' documented in the input schema. The description adds no syntax, format, or constraint details beyond what the schema already provides, so the baseline 3 is appropriate.

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 specific verb+resource: 'Remove duplicate values from an array property in multiple files.' This clearly distinguishes the operation from siblings like batch_array_add, batch_array_remove, and batch_array_sort. However, it does not explicitly reference a sibling alternative or scope boundary, which keeps it just below a 5.

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?

Provides no when-to-use guidance, prerequisites, or alternatives. An agent must infer that this is for deduplication across multiple files, but there is no statement of when to choose this over batch_array_replace or batch_update, nor any exclusions.

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