What problem does it solve?
When exposing Golem agents over HTTP, developers must correctly map incoming request data—path segments, query strings, headers, and bodies—to agent method parameters. This Skill documents the exact mapping rules, supported types, and response conventions so endpoints behave as expected.
Core Features & Use Cases
- Request Parameter Mapping: Bind path variables (including catch-all segments), query parameters, and headers to method parameters using #derive.endpoint, #derive.mount, and #derive.endpoint_header.
- Body Handling: Map JSON request bodies to parameters, and accept raw binary or plain-text payloads via UnstructuredBinary and UnstructuredText with MIME type and language restrictions.
- Response Mapping: Understand how return types (Unit, Option, Result, UnstructuredBinary, UnstructuredText) translate to HTTP status codes and response bodies.
- Use Case: You are building a REST API agent in MoonBit that accepts a task ID in the path, a filter query parameter, an authorization header, and a JSON body—this Skill shows exactly how to declare each binding and which types are allowed.
Quick Start
Ask the AI to show how to map path variables, query parameters, headers, and a JSON body to a MoonBit Golem agent endpoint method.