Skip to main content
Glama

Generate PHP Service

scaffold_service

Generate a PHP service with business logic and input validation, using a repository contract via dependency injection. Avoids overwriting existing files unless explicitly allowed.

Instructions

Generates a PHP Service for a resource (business logic + input validation). Receives the Repository through dependency injection via interface (contract first). Does not overwrite existing files unless overwrite=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
overwriteNo
resourceNameYes
withRepositoryNo
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses a key safety behavior: does not overwrite existing files unless overwrite=true, and mentions the contract-first DI approach. However, it does not mention other potential side effects like file location creation or autoloading updates.

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, front-loads the primary purpose, and includes only necessary behavioral notes. No redundant or vague wording.

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?

For a scaffolding tool with three parameters and no output schema, the description provides the core purpose, a key safety behavior, and architectural context (DI via interface). It could be more complete by covering what withRepository does and where files are placed, but it is sufficiently complete for typical selection.

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?

The description explicitly explains the overwrite parameter's effect, and resourceName is inferable from the purpose. However, withRepository is not explained at all, and schema coverage is 0%, so the description only partially compensates for the missing parameter semantics.

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?

The description clearly states the tool generates a PHP Service for a resource, including business logic and input validation. It is specific enough to distinguish from controller/repository generation, though it does not explicitly name sibling alternatives like scaffold_controller or scaffold_full_resource.

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?

The context implies this is for generating services that receive a repository via dependency injection, but there is no explicit guidance on when to use this versus alternatives such as scaffold_repository or scaffold_full_resource. Exclusions or alternative tool references are missing.

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/X-Gunner/codeigniter-mcp'

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