Skip to main content
Glama

Generate PHP Repository (interface + implementation)

scaffold_repository

Generate a repository interface and PDO implementation with prepared statements for a resource. Prevents overwriting existing files unless explicitly enabled.

Instructions

Generates the Repository of a resource: ALWAYS the interface (contract) and the implementation (PDO adapter with prepared statements) together. Does not overwrite existing files unless overwrite=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYes
overwriteNo
resourceNameYes
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 for behavioral disclosure. It reveals key behaviors: generates both interface and implementation, uses PDO adapter with prepared statements, and respects overwrite=true for existing files. It stops short of covering error handling, directory creation, or file naming conventions, so it is not fully exhaustive but is well above minimal.

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-loaded with the primary purpose followed by the critical overwrite caveat. Every clause adds necessary information, with no filler or redundancy.

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

Completeness3/5

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

For a code-generation tool with no output schema and no annotations, the description covers the essential high-level behavior and overwrite flag. It does not describe what methods the generated repository will contain, naming conventions, or runtime requirements, leaving open questions for an agent trying to predict the full effect of the tool.

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?

The schema provides no descriptions (0% coverage), so the description must compensate. It explicitly clarifies the `overwrite` parameter ('Does not overwrite existing files unless overwrite=true') and references 'resource' for resourceName. However, it does not explain `fields`, which is a required array of objects with name/type pairs, nor how these fields influence the generated repository—leaving a significant interpretation gap.

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 defines the tool's purpose: 'Generates the Repository of a resource' and specifies the exact outputs—'ALWAYS the interface (contract) and the implementation (PDO adapter with prepared statements) together.' This distinguishes it from sibling tools like scaffold_controller and scaffold_service by naming the specific resource layer and mandatory paired artifacts.

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 description implies usage when a repository for a resource is needed, and the 'ALWAYS ... together' phrasing sets expectations for output scope. However, it does not explicitly mention when to prefer this over sibling tools like scaffold_full_resource or scaffold_controller, nor does it state exclusions or alternatives.

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