Skip to main content
A schema is a single .mjs file that wraps a data source for AI agents. Each schema declares its tools, resources, prompts, and skills in a static main export. An optional handlers export adds response transformation. FlowMCP v3.0.0 supports four primitives:

Tools

REST API endpoints. Map parameters to URLs, inject authentication, validate inputs. The core primitive — every schema has at least one tool.

Resources

Local SQLite databases. Fast, deterministic queries for bulk data like company registers, transit schedules, or sanctions lists.

Prompts

Explanatory texts that teach AI agents how a provider’s tools work together — pagination patterns, error codes, data interpretation.

Skills

Multi-step workflow instructions. Reusable pipelines that compose tools and resources into higher-level operations.

Schema Structure

Every schema exports two things:
ExportRequiredPurpose
mainYesDeclarative configuration — tools, resources, prompts, skills. JSON-serializable and hashable.
handlersNoResponse transformation — pre/post processing for API responses.
Most schemas only need main. Add handlers when API responses need transformation before reaching the AI agent.