create-response-dto

Generate typed CommonResponse and Request/Response DTO wrappers for Directum RX WebAPI endpoints.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/dunaevdmitriys-dev/directum-mcp-server --skill create-response-dto
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-response-dto
Source: https://github.com/dunaevdmitriys-dev/directum-mcp-server/tree/main/skills/create-response-dto
Command: npx skills add https://github.com/dunaevdmitriys-dev/directum-mcp-server --skill create-response-dto

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Skill helps create consistent, typed DTO responses for Directum RX WebAPI endpoints instead of returning raw JSON strings, making responses predictable and easier to integrate.

Core Features & Use Cases

  • Creates CommonResponse to standardize IsSuccess and Message across endpoints.
  • Generates Request/Response DTO pairs per endpoint to wrap parameters and deliver a structured payload (Payload) with consistent result semantics.
  • Guides DTO integration into ServerFunctions using Public(WebApiRequestType=...) so endpoints return the expected typed structures.
  • Use case: Refactor an existing WebAPI method that currently returns untyped JSON into a strongly-typed response DTO flow (request → server function → typed response), improving client reliability and validation readiness.

Quick Start

Create DTOs for your WebAPI endpoint by running the create-response-dto skill for the target Module.mtd PublicStructures section.

Frequently Asked Questions about create-response-dto

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create typed DTO responses for Directum RX WebAPI instead of returning raw JSON?

To create typed WebAPI responses in Directum RX, you define PublicStructures in Module.mtd for CommonResponse and per-method Request/Response pairs, replacing untyped JSON with structured IsSuccess, Message, and Payload properties.

What is a CommonResponse structure in Directum RX WebAPI integration?

CommonResponse is a standardized PublicStructure in Directum RX that provides consistent IsSuccess and Message fields across WebAPI endpoints, ensuring predictable success/error messaging and payload delivery for client integrations.

How do I wire PublicStructures into ServerFunctions for a Directum RX WebAPI endpoint?

You wire PublicStructures into ServerFunctions by applying the Public(WebApiRequestType=...) attribute, ensuring Directum RX WebAPI endpoints return the expected typed Response structures instead of raw JSON strings.

Do I need to manually validate WebAPI requests when using PublicStructures in Directum RX?

Validation readiness is built in by defining uniquely named PublicStructures for request parameters. Structuring request DTOs ensures parameters are explicitly typed and prepared for validation logic within the server function.

What's the best way to refactor a Directum RX WebAPI method that returns untyped JSON strings?

The best way is to refactor the endpoint into a strongly-typed DTO flow by generating CommonResponse and method-specific Request/Response PublicStructures in Module.mtd, improving client reliability and standardizing endpoint messaging.

Can I use this approach to standardize error messaging across multiple Directum RX WebAPI endpoints?

Yes, standardizing error messaging is achieved by implementing the CommonResponse PublicStructure, which delivers consistent IsSuccess and Message fields across all Directum RX WebAPI endpoints for predictable error handling.