rdlc-designer-mcp

v0.8.5
@jjp00/rdlc-designer-mcp Checked 1 day ago Published 20 days ago

Servidor MCP (stdio) para crear y editar informes RDLC/RDL de Business Central desde un agente

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

rdlc_open Open a report

Opens an existing .rdlc/.rdl file and returns a sessionId plus a report summary (page, regions, item counts, dataset fields, parameters). Opening a file that is already open returns the existing session.

ParameterTypeDescription
path *stringAbsolute path to the .rdlc/.rdl file

rdlc_create Create a blank report

Writes a blank RDLC template to `path` and opens it as a new session. Refuses to overwrite an existing file unless `overwrite` is true.

ParameterTypeDescription
path *stringAbsolute path of the new .rdlc/.rdl file
overwritebooleanReplace the file if it already exists

rdlc_list_sessions List open sessions

Lists the sessions open in this server with their file, dirty flag and version.

rdlc_save Save the report

Writes the session to its file. Validates against the RDL 2016 schema first and refuses an invalid report (E_VALIDATION, with the problems). Fails with E_CONFLICT if the file changed on disk since it was opened; then use rdlc_reload or rdlc_save_as.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create

rdlc_save_as Save the report to another path

Saves a copy to `path`; the session then points at the new file. Refuses to overwrite an existing file unless `overwrite` is true.

ParameterTypeDescription
path *stringAbsolute path of the target .rdlc/.rdl file
sessionId *stringSession id returned by rdlc_open / rdlc_create
overwriteboolean

rdlc_reload Reload from disk

Re-reads the file from disk and DISCARDS every unsaved edit and the undo history of the session. Use it to resolve an E_CONFLICT.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create

rdlc_close Close a session

Closes the session. If it has unsaved changes it refuses (E_DIRTY) unless `force` is true, which discards them.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create
forcebooleanDiscard unsaved changes

rdlc_get_report Report summary

Page size and margins, region heights, item counts per kind, dataset fields, parameters, embedded images, and whether the report has custom VB code. Pass `includeCode` to also get the <Code> block.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create
includeCodeboolean

rdlc_get_outline Report outline

Compact text map of the layout: one line per item with kind, id, position/size, and a text preview; tablixes list their columns/rows, row/column groups (with member paths) and cell contents. Long texts and expressions are shortened to ~60 chars and marked "…[+N chars]": use rdlc_get_item for the full text. Narrow it with `region` or `id` on large reports. To locate a text, expression or name, use rdlc_find instead of scanning the outline.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create
fullTextbooleanDo not shorten long texts/expressions (more tokens; prefer rdlc_get_item)
idstringOutline only this item and its subtree
maxLinesintegerDefault 400
regionstring

rdlc_get_item Get one item

Full JSON of one item by id: geometry, style, paragraphs/runs for textboxes, body/hierarchies/filters for tablixes, children for rectangles.

ParameterTypeDescription
id *string
sessionId *stringSession id returned by rdlc_open / rdlc_create

rdlc_find Find text in the report

The replacement for grep on the .rdlc: finds `query` in item ids, textbox texts and run labels, Hidden/visibility expressions, image values, tablix group expressions/names/sorting/filters and the report <Code> block. Each hit gives the item `id`, its `region`, `where` inside it (e.g. "text p0.r1" = paragraph 0, run 1, ready for setText; "rowGroup[0].expression"; "line 12" for <Code>) and the text (whole if short, else a window around the match; rdlc_get_item gives it in full). Case-insensitive substring by default; `regex` treats `query` as a regular expression.

ParameterTypeDescription
query *stringText to look for (or a regex with `regex: true`)
sessionId *stringSession id returned by rdlc_open / rdlc_create
caseSensitiveboolean
maxResultsintegerDefault 50
regexboolean
regionstringLimit to one region (also skips the <Code> block)

rdlc_lint Business Central lint

Read-only Business Central lint of the report in memory: unbalanced brackets in expressions, dataset fields BC cannot resolve, unknown fields, missing report items, tablix headers that do not repeat, fonts and images BC does not support. Each finding gives its severity, the item `itemId` and `location` (e.g. "Value"), the raw `params` and an English `message`. `severity` keeps that level and the more serious ones ("warning" → errors and warnings). Findings never block rdlc_save.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create
severitystringLowest level to return (default "hint": all findings)

rdlc_list_commands Command catalog

Without `names`: every editing command as a one-line signature (required fields, [optional fields]). With `names`: the exact JSON Schema of those commands, to build valid input for rdlc_apply_commands.

ParameterTypeDescription
namesarray

rdlc_apply_commands Apply editing commands

Applies editing commands in order. Every command is validated BEFORE any is applied, so a malformed command changes nothing. With `atomic` (default true), if a command is rejected the ones already applied are undone and the report is left as it was. Each command is an object with a `cmd` discriminator, e.g. {"cmd":"setText","id":"Title","p":0,"r":0,"value":"Hello"}; see rdlc_list_commands. The result lists the ids created by insert/duplicate commands.

ParameterTypeDescription
commands *arrayCommands in execution order
sessionId *stringSession id returned by rdlc_open / rdlc_create
atomicbooleanUndo the applied commands if one fails (default true)

rdlc_undo Undo

Undoes the last applied command (or batch). Returns the new version; `changed: false` means there was nothing to undo.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create

rdlc_redo Redo

Redoes the last undone command. `changed: false` means there was nothing to redo.

ParameterTypeDescription
sessionId *stringSession id returned by rdlc_open / rdlc_create