Skip to main content
Glama
GleisonOliveira

php-container-test-mcp

Run a Specific PHP Test File

run_php_test_file

Run a single PHP test file inside a Docker container and return full test output to evaluate pass or fail.

Instructions

ALWAYS use this tool to run a single PHP test file inside a Docker container — never run phpunit directly on the host. Use when the user says: run this test, test this file, run UserTest, run tests for this class, rodar esse teste, testar esse arquivo, rodar o teste do UserController. Returns the full test output (stdout + stderr) so you can evaluate pass/fail.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandNoComposer script to run (e.g. "test", "test:unit"). Defaults to "test".
host_pathNoAbsolute path to the project on the host. Defaults to the server argument or current working directory.
test_fileYesPath to the test file inside the container (e.g. "tests/Unit/UserTest.php").
container_nameYesDocker image name (e.g. "my-php-app:latest").
container_pathNoMount path inside the container. Defaults to the server argument or "/var/www".
Behavior4/5

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

Discloses return value: 'full test output (stdout + stderr)'. Does not mention side effects, but none expected. No annotations to contradict. Could add more about error handling but adequate.

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?

Concise single sentence with examples and return info. Front-loaded with key instruction. No wasted words.

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 5 params, no output schema, and sibling tool, description covers purpose, usage, and return. Lacks error handling details but is complete enough for typical use.

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 coverage is 100% with descriptions for all 5 parameters. Description adds context about Docker usage and defaults but does not significantly enhance understanding beyond schema. Baseline 3 is appropriate.

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 runs a single PHP test file inside a Docker container. The verb 'run' and resource 'PHP test file' are explicit. It distinguishes from sibling tool 'run_php_tests' by specifying 'single' file.

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

Usage Guidelines5/5

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

Provides explicit guidance: 'ALWAYS use this tool' and 'never run phpunit directly on the host'. Includes example user phrases and contrasts with sibling by focusing on single file execution.

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/GleisonOliveira/php-container-test-mcp'

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