Skip to main content
Glama
Majrooo

majrooo-mcp-devkit

by Majrooo

split_file_by_declarations

Split large source files into smaller files by grouping top-level declarations. Preview changes with dry-run mode and generate a combining index file for Rust, TypeScript, Python, or C++.

Instructions

Split a large file into multiple smaller files based on top-level declarations. Optionally generates a combining file (mod.rs / index.ts / init.py). Use dryRun: true (default) to preview the layout before writing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking dir for resolving relative file paths (default: primary project root)
fileYesSource file to split
dryRunNoPreview only — write nothing (default: true)
groupingYesModule groupings
languageNoLanguage (auto-detected from extension)
overwriteNoAllow overwriting existing target files (default: false)
targetDirNoWhere new files are written (default: dirname of file)
generateIndexNoCreate combining file (default: true)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the safety burden. It does this by warning that non-dry-run execution writes files and noting the optional combining-file side effect. It does not detail overwrite or authorization behavior, but the schema covers overwrite.

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 two sentences with the purpose front-loaded and the dryRun guidance as the only additional operational detail. Every sentence earns its place, and no schema information is redundantly repeated.

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 full schema coverage, the description is sufficient for selecting and safely invoking the tool: it states the action, mentions the optional combining file, and highlights the safe preview default. It omits explicit return/output details, but no output schema exists and 'preview the layout' gives a reasonable expectation.

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 the baseline is 3. The description adds only a small amount of extra context, such as combining-file extension examples and the top-level-declaration basis, but does not provide meaningful per-parameter semantics beyond the schema.

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 opens with a specific verb and resource: 'Split a large file into multiple smaller files based on top-level declarations.' This clearly states what the tool does and distinguishes it from siblings like generate_module_skeleton or verify_refactor_safety, which are not about splitting an existing file.

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 gives clear usage context (large file with top-level declarations) and an explicit operational recommendation: 'Use dryRun: true (default) to preview the layout before writing.' It does not name alternatives or state when not to use it, so it stops short of a 5.

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

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/Majrooo/majrooo-mcp-devkit'

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