Skip to main content
Glama
kzmshx

Frontmatter MCP

by kzmshx

batch_array_sort

Sort an array property across multiple Markdown files using a glob pattern. Optionally reverse the order and skip files where the property is missing, empty, already sorted, or not an array.

Instructions

Sort an array property in multiple files.

Args: glob: Glob pattern relative to base directory (e.g. "atoms/**/*.md"). property: Name of the array property. reverse: If True, sort in descending order. Default is ascending.

Returns: Dict with updated_count, updated_files, and warnings.

Notes: - If property doesn't exist, file is skipped. - If array is empty, file is skipped. - If array is already sorted, file is skipped. - If property is not an array, file is skipped with a warning. - Files are only included in updated_files if actually modified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globYes
reverseNo
propertyYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description details edge cases: skipping non-existent/empty/already sorted properties, warning on non-array. However, it doesn't disclose destructive nature or authorization needs, but with no annotations, the description compensates well.

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 well-structured with Args, Returns, Notes sections. It is concise with no redundant phrasing, and the purpose is front-loaded in the first sentence.

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?

The description covers parameter meanings and common edge cases. The output schema exists, so return details are provided. Missing info on atomicity or permissions, but acceptable for this tool.

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

Parameters5/5

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

With 0% schema coverage, the description fully explains each parameter: glob pattern, property name, reverse flag with default. Adds examples and context, exceeding the schema's bare names and types.

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 it sorts an array property in multiple files. This is specific and distinct from sibling tools like batch_array_add and batch_array_remove.

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

Usage Guidelines3/5

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

Usage is implied (sort arrays), but no explicit guidance on when to use vs alternatives. It doesn't mention prerequisites or situations where other batch tools would be preferable.

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/kzmshx/frontmatter-mcp'

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