MARS July’s drop: Logging and AI Skills (and more)

MARS-Curiosity keeps evolving, and this round of updates touches two very different areas: observability — with structured request/response logging designed for the Grafana stack — and AI-assisted development, with official Agent Skills that teach AI coding assistants how to build MARS servers properly.

Request/response logging for Loki and Grafana

If you run REST servers in production, sooner or later you want to answer questions like: which endpoints are slowest? What errors happened last night? How much traffic does each application handle? The Grafana + Loki stack has become a de facto standard for this, and MARS now speaks its language natively.

MARS loggers plug into the global activation hooks (BeforeInvoke, AfterInvoke, InvokeError), so every request, response (with timing) and error gets logged without touching your resource code. Enabling a logger is as simple as adding one unit to your server’s uses clause and flipping a configuration switch.

Structured JSON file logging

The new MARS.Utils.ReqRespLogger.JSON unit writes one JSON object per line (JSON Lines / NDJSON) — exactly the format log shippers like Grafana Alloy and Promtail expect:

{"ts":"2026-06-30T12:34:56.789Z","detected_level":"INFO","source":"MARS","engine":"DefaultEngine","application":"DefaultApp","direction":"in","message":"ResourcePath:helloworld | Verb:GET | Path:/rest/default/helloworld"}

Turn it on from your server’s ini file:

[DefaultEngine]
JSONLogging.Enabled=True
JSONLogging.FileName=mars-reqresp.log
JSONLogging.DailyRotation=True

You get UTC RFC3339 timestamps, daily file rotation, and a set of low-cardinality fields (engine, application, direction, detected_level) that map beautifully to Loki labels. The log file is opened with share-friendly flags, so shippers can tail it live while the server keeps writing.

A minimal Grafana Alloy pipeline — file discovery, JSON parsing, timestamp promotion, labels — is included in the documentation. Once the entries land in Loki, exploring your API traffic in Grafana is a one-liner:

{source="MARS", application="DefaultApp"}
{source="MARS", detected_level="ERR"}

Keeping noise out

Health checks and high-frequency polling endpoints can flood your logs. Mark them with the new [NoLog] attribute and they disappear from the log — requests, responses and errors alike:

[Path('health'), NoLog]
THealthResource = class
  [GET] function Ping: string;
end;

Everything is covered in detail in the new Request/Response Logging documentation page, including the full Alloy configuration.

AI Agent Skills: teach your AI assistant to speak MARS

AI coding assistants are great — until you ask them for Delphi REST code and they hallucinate a framework that doesn’t exist. Agent Skills fix this: they are curated, versioned instruction sets (plain Markdown) that an agent loads on demand when the task matches.

MARS now ships two official skills, living in the Skills/ folder of the repository:

  • mars-new-project — scaffolds a complete MARS server (console, VCL/FMX, Windows service, ISAPI, Apache, Linux daemon) from templates, and knows how to deploy each flavor, HTTPS included.
  • mars-development — everyday MARS development: resources and attributes, parameter binding, JWT authentication and roles, FireDAC dataset publishing, Server-Sent Events, WebStencils templating, client components, configuration and serialization.

Installing in Claude Code

The MARS repository doubles as a Claude plugin marketplace, so installation is two commands:

/plugin marketplace add andrea-magni/MARS
/plugin install mars-curiosity@mars

That’s it. From now on, the agent recognizes MARS code on its own — you don’t even need to mention MARS in your prompts. Ask things like:

Create a new MARS REST server called OrdersAPI, console host, port 8090.

Add a GET /customers/{id} endpoint returning a customer record as JSON.

Protect the customers resource so only users with the ‘admin’ role can POST.

Expose the EMPLOYEE table from my FireDAC connection as a REST endpoint.

…and get idiomatic MARS code back: correct attributes, proper resource registration, the right JWT backend for your platform, datasets serialized the MARS way.

Not a Claude user?

The skills are plain Markdown following an open format, so nothing ties them to a single tool. Copy the folders into your agent’s skills directory, or point your AGENTS.md / custom instructions at Skills/mars-development/SKILL.md and Skills/mars-new-project/SKILL.md. Even pasting them into a system prompt works.

Full installation options and examples are on the new AI Agent Skills documentation page.

A new branching strategy: welcome develop

One more change, less shiny but important if you track the MARS repository directly: day-to-day development has moved to a new develop branch.

Until now, everything landed straight on master. That kept things simple on my side, but it had an unpleasant side effect: many of you have master pinned in git submodules, CI pipelines or build scripts, and every intermediate commit — including work-in-progress ones — showed up in your builds immediately.

From now on:

  • master is the stable branch: it only receives tested, consolidated changes (and releases). If you have MARS as a submodule or clone it in your build pipeline, this is the branch to track — it will move less often, and every move will be meaningful.
  • develop is where daily work happens: new features, fixes and experiments land here first, and get merged into master once they have settled.

If you want to try the newest features early (or contribute — pull requests should now target develop), switch with:

git checkout develop
git pull

Nothing changes for those who install MARS via the release setup: releases keep coming from master as usual.

Wrapping up

Two additions, one theme: making MARS servers easier to operate and easier to build. Structured logging gets your Delphi REST APIs first-class citizenship in a modern Grafana observability stack; Agent Skills get you an AI pair programmer that actually knows the library. And with the new develop branch, tracking MARS just got friendlier for everyone.

As always, feedback and contributions are welcome — on GitHub or the Delphi-Praxis forum.

Stay tuned because there is more coming in the next weeks.

Sincerely,

Andrea

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.