Skip to main content
Glama

generate_test_data_tool

Generate fixed-length test data records with customizable field specifications for software testing and development. Create realistic datasets with string, enum, integer, date, and filler field types.

Instructions

Generate fixed-length test data based on a field specification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYes
num_recordsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:51-54 (handler)
    The `generate_test_data_tool` function is registered as an MCP tool and acts as the handler to call `generate_test_data`.
    @mcp.tool()
    def generate_test_data_tool(fields: List[FieldSpec], num_records: int) -> str:
        """Generate fixed-length test data based on a field specification"""
        return generate_test_data(fields, num_records)
  • main.py:8-15 (schema)
    Pydantic schema definition for `FieldSpec` which defines the input format for the tool.
    class FieldSpec(BaseModel):
        name: str
        type: Literal["string", "enum", "integer", "date", "filler"]
        length: int
        values: Optional[list[str]] = None
        format: Optional[str] = "%Y%m%d"
        min: Optional[int] = 0
        max: Optional[int] = 9999
  • main.py:44-49 (helper)
    Helper function that generates the actual test data based on the provided field specifications.
    def generate_test_data(fields, num_records):
        lines = []
        for _ in range(num_records):
            line = "".join(generate_field(field) for field in fields)
            lines.append(line)
        return "\n".join(lines)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'fixed-length' as a constraint, but fails to describe critical behaviors: whether the tool is read-only or mutating, what the output looks like (though an output schema exists), error handling, or performance aspects like rate limits. This leaves significant gaps for an agent.

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 a single, efficient sentence with zero waste. It is front-loaded with the core purpose and avoids redundancy. Every word earns its place, making it highly concise and well-structured.

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?

Given the tool's moderate complexity (2 parameters with nested FieldSpec objects) and no annotations, the description is incomplete—it lacks behavioral and parameter details. However, the presence of an output schema mitigates the need to explain return values. This results in a baseline adequacy but with clear gaps.

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%, meaning parameters are undocumented in the schema. The description adds minimal value by implying 'field specification' relates to the 'fields' parameter and 'fixed-length' hints at 'length' in FieldSpec, but it does not explain 'num_records', data types, or other schema details. It inadequately compensates for the coverage gap.

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's purpose: 'Generate fixed-length test data based on a field specification.' It specifies the verb ('generate'), resource ('test data'), and key constraint ('fixed-length'). However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus other methods or tools. It lacks context about prerequisites, typical scenarios, or exclusions. Without sibling tools, it could at least hint at use cases like testing or data simulation, but it does not.

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/cdelashmutt-pivotal/sample-data-mcp'

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