Skip to main content
Glama
BC MCP Server

BC MCP Server

atdd_create_unit_tests

Generate complete AL test codeunits from markdown test plans with Gherkin scenarios following Ciellos ATDD guidelines for Business Central.

Instructions

Generate AL test codeunit from a test plan markdown following Ciellos ATDD guidelines. Returns complete AL code.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "testPlan": "<testPlan>"
    },
    "name": "atdd_create_unit_tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
testPlanYesTest plan content in markdown format with Gherkin scenarios
codeunitIdNoCodeunit ID (default: 50100)
codeunitNameNoCodeunit name (auto-generated if not provided)
libraryCodeunitNoLibrary codeunit name to use (default: LibraryApprovedSupplier182FDW)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It does usefully state the output modality ('Returns complete AL code'), implying generation rather than in-place file modification, but says nothing about whether an existing codeunit with the given ID is overwritten, whether permissions or a BC connection are required, or whether the plan must validate first.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the action and followed by the return behavior. No filler, though the second sentence is thin enough that it could have been merged or used to add a constraint instead.

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?

There is no output schema and no annotations, so the description must stand in for both; it only partially does so by declaring the return value. It omits failure behavior for malformed test plans and any preconditions, which matters for a code-generating tool with four parameters.

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 description coverage is 100%, so all four parameters (testPlan, codeunitId, codeunitName, libraryCodeunit) are already documented with their defaults in the schema. The description adds no additional meaning about format, constraints, or interactions between them, so the baseline of 3 applies.

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?

States a specific verb and resource — 'Generate AL test codeunit' — plus the input form (test plan markdown) and the convention it follows (Ciellos ATDD guidelines). It is clearly distinguishable from the sibling validators and atdd_parse_test_plan, though it never names those siblings explicitly.

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?

Usage is only implied: the agent must infer it should have a Gherkin test plan in hand before calling. There is no explicit when-to-use, no sequencing advice relative to atdd_parse_test_plan or the atdd_validate_* tools, and no when-not-to-use case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.