Agents

Agents MCP

Model Context Protocol is a strong fit when your agent platform needs typed tools around NativeForm APIs. This guide outlines tool boundaries and runtime controls for reliable model-to-API execution.

MCP tools call the same underlying endpoints documented in read APIs and submit APIs. Secure your keys with the patterns in Agents Auth.

Transport

Keep your MCP server stateless where possible, then delegate business logic to backend routes.

Recommended flow

MCP tool call → internal service endpoint → NativeForm API → normalized tool response.

Stateless design

Avoid storing API keys or session state in the MCP server. Inject credentials at the service layer.

Tool Contract

Define strict schemas so the model produces actionable arguments.

Schema Fields

namestringRequired

Unique tool identifier. Use a namespaced format like nativeform_submit_response to avoid collisions.

descriptionstringRequired

Plain-language description the model reads to decide when to call this tool.

input_schemaobjectRequired

JSON Schema defining the tool's parameters. The model generates arguments matching this schema.

Properties

formIdstring

The NativeForm form ID to submit to.

textstring

Free-form text the AI extracts structured fields from.

respondentEmailstring

Optional email to associate with the submission.

Full tool definition

Hardening

Operational controls for safe MCP deployment.

Validate every tool input

Check types, lengths, and required fields before issuing a NativeForm request. Reject malformed inputs early.

Scope tools by context

Scope available tools by tenant, environment, and user role. Not every agent session needs write access.

Throttle tool calls

Rate-limit tool calls per session to avoid accidental loops. A runaway agent can exhaust your API quota in seconds.

Return structured errors

Return structured error objects so the model can recover with follow-up actions rather than retrying blindly.