Skip to main content
Glama

Scaffold native CI4 MCP server (Live runtime introspection)

scaffold_ci4_mcp_server

Generates a CodeIgniter 4 Spark command that runs an in-app MCP server over stdio, letting AI assistants inspect live databases, run read-only queries, check migrations, and list routes.

Instructions

Generates a native CodeIgniter 4 Spark command (app/Commands/McpServer.php) that runs an in-app Model Context Protocol (MCP) server over stdio. Enables AI assistants (Claude Code, Cursor, Trae) to inspect live database tables, run read-only queries, check migration status, and list compiled routes. Requires overwrite=true to overwrite existing files.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "scaffold_ci4_mcp_server"
  }
}

Input Schema

NameRequiredDescriptionDefault
readOnlyNo
classNameNoMcpServer
overwriteNo
commandNameNomcp:serve
withRouteToolsNo
withDatabaseToolsNo
withMigrationToolsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

B3.1/5.0
Behavior3/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. It does usefully disclose the write target path and that existing files are protected unless overwrite=true, but it says nothing about what happens on a name collision, what the generated server's safety profile is, or what the call returns.

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?

Three front-loaded sentences with no filler: purpose and artifact path first, capabilities second, the destructive-action caveat last. Slightly dense but every clause carries information.

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?

A seven-parameter generator with no annotations, no output schema, and zero schema coverage needs the description to explain the toggles and the return value. It explains one parameter and the artifact path, leaving the agent to guess at the rest.

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

Parameters2/5

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

Schema description coverage is 0% across seven parameters, and the description only explains `overwrite`. The toggles (`withRouteTools`, `withDatabaseTools`, `withMigrationTools`) and `readOnly`/`className`/`commandName` are only obliquely hinted at by the list of capabilities and receive no direct mapping.

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 and resource — generates a CI4 Spark command at `app/Commands/McpServer.php` that hosts an in-app MCP server over stdio. That is far more concrete than the sibling scaffolder names, though it never explicitly contrasts itself with them.

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?

Implies usage by describing what the generated server enables (live DB inspection, read-only queries, migration status, routes) and notes the overwrite=true prerequisite for replacing files. It gives no explicit when-not guidance or named alternative for cases where a plain scaffold_controller/repository would be preferable.

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