Skip to main content
Glama
demilul

accform-layout-mcp

by demilul

accform-layout-mcp

Local MCP server and CLI for Access layout files (*.bas, SaveAsText), rendered to SVG without Microsoft Access. This lets you visually verify form/report layout changes directly.

Features

  • MCP tools: render_form, render_form_svg, list_forms

  • CLI: accform-cli for single-file and batch rendering

  • Default output under rendered/YYYY-MM-DD/

  • Optional PNG export via cairosvg

Related MCP server: mcp-sketch

Installation

Install from repository

python -m venv .venv
.venv\Scripts\activate
pip install .

Optional PNG support:

pip install ".[png]"

Start the MCP server

After installation:

accform-layout-mcp

Alternative (directly from repository):

python server.py

Use the CLI

Render a single file:

accform-cli path/to/F_Contract.bas

Render multiple files in one run:

accform-cli forms/F_Contract.bas forms/F_Customer.bas

Use a custom output directory:

accform-cli forms/F_Contract.bas -o out/svg

Generate optional PNG output:

accform-cli forms/F_Contract.bas --png

Show all options:

accform-cli --help

MCP in VS Code Copilot (Agent Mode)

Example for .vscode/mcp.json:

{
  "servers": {
    "accform-layout": {
      "type": "stdio",
      "command": "python",
      "args": ["${workspaceFolder}/server.py"],
      "env": {
        "ACCFORM_SRC_ROOT": "${workspaceFolder}"
      }
    }
  }
}

ACCFORM_SRC_ROOT limits file discovery to your project folder.

Tool behavior

  • render_form(form, scale_mode="Universal")

    • renders SVG to rendered/YYYY-MM-DD/...

    • returns the path to the generated file

  • render_form_svg(form, scale_mode="Universal")

    • returns SVG markup as text

    • also writes the same SVG file to disk

  • list_forms()

    • lists all detected layout *.bas files under ACCFORM_SRC_ROOT

What rendering includes

Static rendering includes declarative designer state:

  • positions, sizes, captions

  • absolute colors

  • visible/hidden controls (hidden controls are dimmed)

It does not include runtime VBA behavior, for example:

  • Form_Load logic

  • dynamic RecordSource

  • conditional formatting

  • data-driven subforms

Fidelity

Faithfully ported: parse tree, twips-to-pixel conversion, section stacking, painter order, and renderers for Label/TextBox/ComboBox/ListBox/CommandButton/Rectangle/Line, including OLE color conversion.

Reconstructed: CheckBox/OptionButton, Image, Tab, Subform, OptionGroup, placeholder rendering, and theme color references.

Development

Install dependencies from requirements.txt:

pip install -r requirements.txt

License

MIT. See LICENSE.

Available Tools

3 tools
list_formsA

List the Access form/report layout files (*.bas designer files) available under the configured source root, as paths relative to it.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

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

No annotations provided. Description states it lists files under a configured source root, which implies read-only behavior, but does not explicitly confirm lack of side effects or required permissions.

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?

Single sentence, 20 words, front-loads purpose. No extraneous information.

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 no parameters and existence of an output schema, the description covers the tool's scope and output format adequately. The term 'configured source root' is not elaborated but likely a global context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has zero parameters with 100% coverage. Description adds meaning beyond schema by specifying file type (*.bas designer files) and output format (paths relative to source root).

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 uses a specific verb 'List' and specifies the resource as 'Access form/report layout files (*.bas designer files)', clearly distinguishing it from sibling tools render_form and render_form_svg which handle rendering.

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?

No explicit guidance on when to use this tool versus alternatives, but siblings are rendering-focused, implying listing is for discovery. Usage context is implied but not stated.

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

render_formA

Render an Access form/report layout to SVG and store it under a dated artifact folder so the result is inspectable without a native Cairo stack.

Pass the form name (e.g. 'A_Lot_Liste') or the path to its *.bas layout file. The render reflects only the declarative designer layout on disk: positions, sizes, captions, absolute colours, hidden controls (dimmed). It does NOT reflect runtime VBA behaviour (Form_Load hiding controls, dynamic RecordSource, conditional formatting).

ParametersJSON Schema
NameRequiredDescriptionDefault
formYes
scale_modeNoUniversal

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description bears the full burden of disclosure. It explains that the render is based on declarative designer layout only, not runtime behavior, and mentions storage under a dated folder. This gives agents a good understanding of the tool's behavior, though it could further clarify if any side effects exist (e.g., file creation).

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?

The description is reasonably concise, consisting of two short paragraphs. The first sentence clearly states the main purpose, and the second paragraph adds necessary caveats. No unnecessary repetition or fluff.

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 tool's complexity (rendering and storage), the description adequately covers input, behavior, and limitations. The output schema is present (though not shown), so agents can rely on it for return values. Missing details like scale_mode options are a minor gap.

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?

The description adds meaning for the 'form' parameter by indicating it accepts form names or *.bas file paths, which is not in the schema. However, the 'scale_mode' parameter is not explained beyond its default value, leaving agents without guidance on what values are valid or how they affect output. With 0% schema description coverage, the description partially compensates but not fully.

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 the tool renders an Access form/report layout to SVG and stores it under a dated artifact folder. This specific verb+resource combination distinguishes it from siblings list_forms (listing) and render_form_svg (likely just returning SVG without storage).

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

Usage Guidelines4/5

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

The description explains how to use the tool (pass form name or *.bas file path) and what it does not reflect (runtime VBA behavior), providing clear context for when to use it versus alternatives. However, it does not explicitly mention when to use sibling tools.

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

render_form_svgA

Render an Access form/report layout to SVG markup (text). Useful when you want to inspect exact control coordinates, sizes and captions rather than just look at a picture. Same layout caveats as render_form.

ParametersJSON Schema
NameRequiredDescriptionDefault
formYes
scale_modeNoUniversal

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided. The description only mentions 'Same layout caveats as render_form' without elaborating on what those caveats entail. There is no discussion of side effects, required permissions, or output specifics beyond the fact that it returns SVG markup.

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 plus a brief caveat reference. It is front-loaded with the core functionality and provides a clear use case with no extraneous information.

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

Completeness2/5

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

Despite having an output schema, the tool's parameters (especially 'scale_mode') are completely undocumented in the description. The reference to layout caveats is vague. For a tool with two parameters and no annotations, the description is insufficient for confident usage.

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?

Input schema has 0% coverage for parameter descriptions. The description only implicitly references the 'form' parameter but does not explain valid values or the 'scale_mode' parameter at all. The description adds no additional meaning to the schema.

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 the tool renders an Access form/report layout to SVG markup text. It distinguishes itself from the sibling 'render_form' by emphasizing the utility for inspecting exact coordinates and sizes rather than just viewing an image.

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

Usage Guidelines4/5

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

The description provides a clear use case ('when you want to inspect exact control coordinates, sizes and captions') and references 'Same layout caveats as render_form' to guide usage. Lacks explicit when-not-to-use, but the context is strong.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedlist_forms
    • First observedrender_form
    • First observedrender_form_svg

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: listing available forms, rendering to a stored SVG file, and rendering to SVG text output. There is no overlap or ambiguity.

Naming Consistency4/5

All tools follow an underscore_separated verb_noun pattern. 'render_form_svg' is a slight deviation as it adds a suffix, but it is still clear and consistent with the base verb.

Tool Count5/5

With only 3 tools, the server is well-scoped for its purpose of inspecting Access form layouts. Each tool is justified and there is no bloat.

Completeness4/5

The server covers the core workflow: list forms and render them in two formats. It lacks tools for modifying or uploading forms, but for an inspection-focused server, this is a minor gap.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    MCP server that turns AI into an SVG artist. One rendering engine with a rich JSON schema, AI controls all design parameters. Renders animated SVGs with CSS @keyframes and SMIL animations. Supports 16+ element types, parametric curves, pattern groups, gradient/filter/clip/mask definitions, and PNG preview. No external dependencies, runs locally via npx.
    3
    81 npm
    22
    MIT