Skip to main content
Glama
phoenice-labs

io.github.phoenice-labs/universal-test-framework

Official

register_contracts

Extract per-method contract blocks from test files and register them in the UTF registry, enabling contract detail cards in generate_report outputs.

Instructions

Parse test files and register per-method 8-section contract records.

This is the UTF registration bridge — it reads LLM-written test files, extracts the per-method 8-section comment blocks, and upserts status=generated rows into the UTF registry. Without this step, generate_report has no Per-Test Contract Detail cards.

IMPORTANT — Phase 1, Step ③ of the UTF 3-phase workflow: ① generate_tests (scaffold) ② Write real test methods with per-method TC-{PRJ}-{MODULE}-{NNN} blocks ③ register_contracts ← this tool ④ generate_report (verify contract detail cards) ⑤ pytest --junit-xml=... ⑥ import_test_results ⑦ generate_report (now shows both contract cards AND execution results)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageNoOne of python|typescript|java|go|... Default: pythonpython
frameworkNoOne of pytest|jest|junit5|... Default: pytestpytest
test_typeNoOne of unit|integration|api|e2e|... Default: e2ee2e
project_idNoRegistry project label. Defaults to project_dir basename.
test_filesYesList of test file paths (absolute or relative to project_dir).
project_dirNoAbsolute path to project root (.utf/utf.db lives here). Defaults to UTF_PROJECT_DIR env var or cwd.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It explains the tool reads test files, extracts comment blocks, and upserts rows into the registry, which is transparent. However, it does not disclose error handling, permissions, or output schema details.

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 well-structured with a clear first line, an explanation paragraph, and a numbered workflow list. Every sentence is informative with 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 the complexity (6 params, output schema, many siblings), the description effectively covers the tool's role in the workflow. It omits edge cases or failure modes but is sufficient 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%, so the baseline is 3. The description adds workflow context but does not elaborate on parameter usage beyond what the schema already provides.

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 parses test files and registers per-method contract records. It distinguishes itself by placing it as a specific step in the UTF workflow, differentiating from siblings like generate_tests and generate_report.

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?

The description explicitly lists the 3-phase workflow with steps ①-⑦, positioning register_contracts as Step ③. It also states that without this step, generate_report has no contract detail cards, providing clear when-to-use context.

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/phoenice-labs/Universal-Test-Framework'

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