Naturali · Schema

CreateAgentRequest

Exactly one of `ai_provider_id` or `model_route_id` must be set (400 otherwise). `model` names the model on a pinned provider and cannot be combined with `model_route_id`, whose targets each name their own model.

AI AgentsAutomationGuardrailsEvaluationManaged Models

Properties

Name Type Description
ai_provider_id string Public ID of the AI provider to pin. Mutually exclusive with `model_route_id`.
model_route_id string Public ID of a model route in the same project. The agent's completion model is then resolved through the route's ordered targets with failover. Mutually exclusive with `ai_provider_id` and `model`.
name string Display name.
instructions string System instructions, sent as the system message of every generation.
model string Model identifier on the pinned AI provider. Omitted, the provider's default model is used. Cannot be combined with `model_route_id`.
tool_bindings array Tools to attach, one binding object per tool — the only attachment field. An entry is either a reference (`{ "tool_id": … }`) or an inline definition (`{ "tool": … }`). See [Tool Bindings](/docs/modul
max_steps integer Maximum agent loop steps per turn (default `20`).
tool_choice object Tool choice strategy. Accepts a string (`"auto"`, `"required"`) or an object (`{ "type": "tool", "tool_name": "my_tool" }`). A forcing value (`"required"` or the object form) forbids a final assistant
stop_conditions array Conditions that end the agent's work early, on top of `max_steps`. Two scopes: `{"type": "has_tool_call", "tool_name": ""}` ends the **turn** after the step that calls the named to
active_tool_ids array Persisted tools from `tool_bindings` the model sees on every step. Omitted or `[]` leaves every bound tool active. An id not among the agent's `tool_bindings` is rejected with 400. See [Active Tools](
guardrail_ids arraynull Guardrails attached at the agent scope.
step_rules array Per-step overrides of `tool_choice` and `active_tool_ids`, numbered from the first step of the turn. See [Step Rules](/docs/modules/agents#step-rules).
policy_ids array Under `run_as: caller`, the policies capping the caller's permissions on every generation; under `run_as: agent`, the agent's own grant. The caller must hold every grant they carry inside the agent's
run_as string What `policy_ids` are: `caller` (default) caps the caller, `agent` makes them the agent's own grant. `agent` requires a non-empty `policy_ids`, else `400 AGENT_RUN_AS_REQUIRES_POLICIES`.
temperature number Sampling temperature passed to the model. Omitted, the provider's default applies.
knowledge_config object Knowledge search run before every generation; its matches are prepended as reference context. Every id it names is a resource of the agent's project, else `400`. See [Knowledge Config](/docs/modules/a
output_schema objectnull JSON Schema describing the structured object the model must return. When set, non-streaming generations constrain output to this schema and the parsed value is returned as `output.object`. The schema
prompt_caching objectnull Prompt caching for this agent's turns. `{"enabled": true}` marks two cache breakpoints: the end of the system block, which covers the tool definitions and the instructions, and the last message of eac
max_context_messages integer Maximum number of recent messages included in the context window. Null means no limit.
max_output_tokens integernull Maximum number of tokens the model may generate per step of a turn. A response that reaches it stops with `stop_reason` `length`. Null leaves the model's default.
reasoning objectnull How much the model reasons before answering. Translated per provider (Anthropic thinking, Gemini thinking config, OpenAI reasoning effort) against what the model supports; a model that cannot reason i
single_session_per_actor boolean When true, only one open session per actor_id is allowed for this agent.
trace_content_mode stringnull Zero-retention opt-in for this agent. `null` inherits the project's setting; `none` means trace and generation content is never written. Setting `full` under a project whose own mode is `none` is refu
on_approval_expiry stringnull What happens when one of this agent's held tool calls expires un-approved. `null` (the default) and `terminate` end the chain there — the expired approval, its `approvals.expired` event and the auto-f
version_label stringnull Optional tag for the config version this write creates (e.g. `initial`). Annotates the version only — it is not stored on the agent and is not part of the config, so labelling a change is never itself
View JSON Schema on GitHub

JSON Schema

naturali-ai-create-agent-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/naturali-ai/json-schema/naturali-ai-create-agent-request-schema.json",
  "title": "CreateAgentRequest",
  "description": "Exactly one of `ai_provider_id` or `model_route_id` must be set (400 otherwise). `model` names the model on a pinned provider and cannot be combined with `model_route_id`, whose targets each name their own model.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/naturali-ai-openapi.json#/components/schemas/CreateAgentRequest",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "ai_provider_id": {
      "x-naturali-ref": "ai-providers",
      "type": "string",
      "description": "Public ID of the AI provider to pin. Mutually exclusive with `model_route_id`."
    },
    "model_route_id": {
      "x-naturali-ref": "model-routes",
      "type": "string",
      "description": "Public ID of a model route in the same project. The agent's completion model is then resolved through the route's ordered targets with failover. Mutually exclusive with `ai_provider_id` and `model`."
    },
    "name": {
      "description": "Display name.",
      "type": "string"
    },
    "instructions": {
      "description": "System instructions, sent as the system message of every generation.",
      "type": "string"
    },
    "model": {
      "description": "Model identifier on the pinned AI provider. Omitted, the provider's default model is used. Cannot be combined with `model_route_id`.",
      "type": "string"
    },
    "tool_bindings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ToolBinding"
      },
      "description": "Tools to attach, one binding object per tool — the only attachment field. An entry is either a reference (`{ \"tool_id\": … }`) or an inline definition (`{ \"tool\": … }`). See [Tool Bindings](/docs/modules/agents#tool-bindings)."
    },
    "max_steps": {
      "description": "Maximum agent loop steps per turn (default `20`).",
      "type": "integer"
    },
    "tool_choice": {
      "description": "Tool choice strategy. Accepts a string (`\"auto\"`, `\"required\"`) or an object (`{ \"type\": \"tool\", \"tool_name\": \"my_tool\" }`). A forcing value (`\"required\"` or the object form) forbids a final assistant message on every step of every turn, including a resumed or continued one, so it requires a `has_tool_call` entry in `stop_conditions` — otherwise the write is refused with `FORCED_TOOL_CHOICE_CANNOT_STOP`."
    },
    "stop_conditions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentStopCondition"
      },
      "description": "Conditions that end the agent's work early, on top of `max_steps`. Two scopes:\n\n`{\"type\": \"has_tool_call\", \"tool_name\": \"<resolved tool name>\"}` ends the **turn** after the step that calls the named tool. It narrows when the loop ends — it never lets it run past `max_steps`.\n\n`{\"type\": \"max_chain_generations\", \"max_generations\": <n>}` bounds the **continuation chain** instead: once the chain has spawned that many generations, further resumptions stop with `chain_limit` rather than extending it. It never shortens a turn. The effective ceiling is the smaller of this and the deployment's `MAX_CONTINUATION_CHAIN_GENERATIONS`, so an agent can be stricter than the platform but never looser.\n\nAn unknown `type`, a `has_tool_call` without a `tool_name`, a `max_chain_generations` whose `max_generations` is not a positive integer, or a non-object entry is rejected with 400."
    },
    "active_tool_ids": {
      "description": "Persisted tools from `tool_bindings` the model sees on every step. Omitted or `[]` leaves every bound tool active. An id not among the agent's `tool_bindings` is rejected with 400. See [Active Tools](/docs/modules/agents#active-tools).",
      "x-naturali-ref": "tools",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "guardrail_ids": {
      "x-naturali-ref": "guardrails",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Guardrails attached at the agent scope."
    },
    "step_rules": {
      "description": "Per-step overrides of `tool_choice` and `active_tool_ids`, numbered from the first step of the turn. See [Step Rules](/docs/modules/agents#step-rules).",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AgentStepRule"
      }
    },
    "policy_ids": {
      "x-naturali-ref": "policies",
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Under `run_as: caller`, the policies capping the caller's permissions on every generation; under `run_as: agent`, the agent's own grant. The caller must hold every grant they carry inside the agent's project, else `403 POLICY_GRANT_NOT_HELD`. See [Execution Identity](/docs/modules/agents#execution-identity)."
    },
    "run_as": {
      "type": "string",
      "enum": [
        "caller",
        "agent"
      ],
      "description": "What `policy_ids` are: `caller` (default) caps the caller, `agent` makes them the agent's own grant. `agent` requires a non-empty `policy_ids`, else `400 AGENT_RUN_AS_REQUIRES_POLICIES`.",
      "default": "caller"
    },
    "temperature": {
      "description": "Sampling temperature passed to the model. Omitted, the provider's default applies.",
      "type": "number"
    },
    "knowledge_config": {
      "description": "Knowledge search run before every generation; its matches are prepended as reference context. Every id it names is a resource of the agent's project, else `400`. See [Knowledge Config](/docs/modules/agents#knowledge-config).",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "memory_store_ids": {
          "x-naturali-ref": "memory-stores",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "document_ids": {
          "x-naturali-ref": "documents",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "document_paths": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tags": {
          "description": "Key-value pairs a result's own `tags` must all contain (exact match). Scopes documents and memories alike.",
          "allOf": [
            {
              "$ref": "#/$defs/TagBag"
            }
          ]
        },
        "min_score": {
          "type": "number",
          "description": "Minimum raw cosine similarity (0–1) a vector candidate must reach to be ranked, the floor the search endpoint spells `min_similarity`. No default: omitted means no floor at all, and every one of the `limit` nearest chunks is injected however weak it is.\n"
        },
        "rrf_k": {
          "type": "integer",
          "description": "The `k` in the fusion term `1 / (k + rank)`, the same knob knowledge search takes. Smaller weights the top of each ranking more heavily. Omitted, the default of 60 applies.\n"
        },
        "recency_half_life_days": {
          "type": "number",
          "description": "Half-life in days of the decay applied to **memory** results after fusion, the same knob knowledge search takes. `0` disables it. Omitted, the default of `0` applies.\n"
        },
        "limit": {
          "type": "integer",
          "description": "Maximum number of results to inject. Omitted, 10 are injected.\n"
        },
        "write_memory_store_id": {
          "x-naturali-ref": "memory-stores",
          "type": [
            "string",
            "null"
          ],
          "description": "Public ID of the memory store the agent can write to during generation. When set, a write_memory tool is automatically available to the agent."
        }
      }
    },
    "output_schema": {
      "type": [
        "object",
        "null"
      ],
      "description": "JSON Schema describing the structured object the model must return. When set, non-streaming generations constrain output to this schema and the parsed value is returned as `output.object`. The schema is enforced on the way back, not just sent to the model: an object that violates it fails the generation with 502 `OUTPUT_SCHEMA_VALIDATION_FAILED`, naming the violated field. Constraints beyond `required`/`type` (`minLength`, `enum`, `pattern`, `minItems`) are honored and are what reject a structurally valid but degenerate answer. See the Structured Output section in the Agents module docs."
    },
    "prompt_caching": {
      "type": [
        "object",
        "null"
      ],
      "description": "Prompt caching for this agent's turns. `{\"enabled\": true}` marks two cache breakpoints: the end of the system block, which covers the tool definitions and the instructions, and the last message of each step, which covers the conversation so far. A provider that caches by explicit breakpoint then reads, on every later step and every later turn of the session, the whole prefix the previous one sent, and writes only what was appended. Null or omitted is off: a cache write costs more than an uncached token, so an agent whose prefix is never re-read would pay for the privilege. A prefix below the model's minimum cacheable length is not cached. Cache reads are reported as `cached_tokens` and cache writes as `cache_write_tokens` on usage; a write with no `cache_write_tokens` price bills at the input rate.",
      "additionalProperties": false,
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Whether the breakpoint is marked. Defaults to false."
        }
      }
    },
    "max_context_messages": {
      "type": "integer",
      "description": "Maximum number of recent messages included in the context window. Null means no limit."
    },
    "max_output_tokens": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "description": "Maximum number of tokens the model may generate per step of a turn. A response that reaches it stops with `stop_reason` `length`. Null leaves the model's default."
    },
    "reasoning": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "required": [
        "effort"
      ],
      "description": "How much the model reasons before answering. Translated per provider (Anthropic thinking, Gemini thinking config, OpenAI reasoning effort) against what the model supports; a model that cannot reason ignores it. `none` turns reasoning off where the model allows it. Reasoning tokens are metered as output. Null leaves the model's default.",
      "properties": {
        "effort": {
          "type": "string",
          "enum": [
            "none",
            "low",
            "medium",
            "high"
          ]
        }
      }
    },
    "single_session_per_actor": {
      "type": "boolean",
      "description": "When true, only one open session per actor_id is allowed for this agent."
    },
    "trace_content_mode": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "full",
        "none",
        null
      ],
      "description": "Zero-retention opt-in for this agent. `null` inherits the project's setting; `none` means trace and generation content is never written. Setting `full` under a project whose own mode is `none` is refused with 400 — the project is a floor an agent may only tighten."
    },
    "on_approval_expiry": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "terminate",
        "react",
        null
      ],
      "description": "What happens when one of this agent's held tool calls expires un-approved. `null` (the default) and `terminate` end the chain there — the expired approval, its `approvals.expired` event and the auto-filed `approval_expired` exception are the whole record. `react` spawns a continuation that reports the staleness to the agent, for an agent that acts on it."
    },
    "version_label": {
      "type": [
        "string",
        "null"
      ],
      "description": "Optional tag for the config version this write creates (e.g. `initial`). Annotates the version only — it is not stored on the agent and is not part of the config, so labelling a change is never itself a change."
    }
  },
  "$defs": {
    "AgentStepRule": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "step"
      ],
      "description": "One per-step override. Steps not named by a rule use the agent's own `tool_choice` and `active_tool_ids`.",
      "properties": {
        "step": {
          "type": "integer",
          "description": "The 1-indexed step of the turn this rule applies to. The numbering spans a `requires_action` pause."
        },
        "tool_choice": {
          "description": "Tool choice for this step — `auto`, `required`, `null`, or `{ \"type\": \"tool\", \"tool_name\": \"search\" }`. Stored verbatim."
        },
        "active_tool_ids": {
          "x-naturali-ref": "tools",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Tool IDs active on this step, each among the agent's `tool_bindings`."
        }
      }
    },
    "AgentStopCondition": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type"
      ],
      "description": "One stop condition. `has_tool_call` ends the turn after the step that calls `tool_name`; `max_chain_generations` bounds the continuation chain at `max_generations`.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "has_tool_call",
            "max_chain_generations"
          ],
          "description": "Which scope the condition ends."
        },
        "tool_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The resolved tool name a `has_tool_call` condition matches. Required for that type."
        },
        "max_generations": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Generations the continuation chain may reach before further resumptions stop with `chain_limit`. Required for `max_chain_generations`, and must be a positive integer."
        }
      }
    },
    "CreateToolRequest": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Tool name"
        },
        "type": {
          "type": "string",
          "enum": [
            "http",
            "client",
            "mcp",
            "builtin",
            "pipeline",
            "naturali"
          ],
          "description": "Tool type (default http)"
        },
        "description": {
          "type": "string",
          "description": "What the tool does"
        },
        "parameters": {
          "type": "object",
          "description": "JSON Schema for tool input. On `http` and `pipeline` tools every call's input, `preset_parameters` merged in, must satisfy it: otherwise the call is `400 VALIDATION_FAILED` before any guardrail or dispatch. `mcp` actions declare their own on the server."
        },
        "execute": {
          "$ref": "#/$defs/ToolExecuteConfig"
        },
        "mcp": {
          "$ref": "#/$defs/ToolMcpConfig"
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Allowlist of actions. For `builtin` tools: action names (required). For `mcp` tools: an optional allowlist of MCP tool names to scope the server surface — omit or set `null` to expose every tool the MCP server offers. Ignored for other tool types."
        },
        "denied_actions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "For `mcp` tools: an optional denylist of MCP tool names to hide. Applied after `actions` and taking precedence over it. Use it to scope a read+write MCP server read-only by denying just the write tools. Omit or set `null` to deny nothing. Ignored for other tool types."
        },
        "context_keys": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Optional allowlist of `tool_context` keys that may be forwarded to this tool as prefixed context headers (`X-Naturali-Context-<key>` by default). When `null` or omitted, every key in the caller's `tool_context` is forwarded. When set, only the listed keys are, so a per-user credential in `tool_context` can be confined to the tools that need it; `[]` forwards none. The server-pinned identity keys (`session_id`, `actor_id`, `actor_external_id`) are always forwarded. A key consumed by a `{{context:<key>}}` token in this tool's own headers is substituted regardless of this list — the tool declared that header itself."
        },
        "preset_parameters": {
          "type": "object",
          "description": "Fixed parameters pinned on every call this tool makes, whatever its type. Keys matching fields in the input schema are removed from the schema shown to the model, and a pinned value wins over one the model or a direct caller supplies for the same key. On an `mcp` tool a preset reaches each action whose input schema declares it; an action whose schema declares no properties receives every one.\n\nValues accept `{{context:<key>}}` references, resolved per call from the caller's `tool_context`, so a pin can be the run's own value — the one account this run may act on — rather than one fixed when the tool was created. A resolved value is retyped to the parameter's declared schema type; a key missing from the call's `tool_context` fails the call with `MISSING_TOOL_CONTEXT_KEY` rather than sending the literal placeholder. `{{secret:...}}` is not resolved here. See the Tool Context reference."
        },
        "pipeline": {
          "type": "object",
          "description": "Pipeline definition for `pipeline` tools. See the `pipeline` field on the Tool schema for the full structure."
        },
        "output_mapping": {
          "type": "object",
          "description": "Universal JSON Logic mapping applied to the tool's raw result. See the `output_mapping` field on the Tool schema for details."
        },
        "guardrail_ids": {
          "x-naturali-ref": "guardrails",
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Guardrails attached at the tool scope."
        },
        "trusted_output": {
          "type": "boolean",
          "description": "Declares this tool's results content no attacker can write, so they do not count toward `runtime.generations.untrusted_tool_results.total`. Default `false`. Setting `true` loosens every guardrail reading that key, so it requires `guardrails:DetachGuardrail` besides the write's own permission (`403 ACTION_NOT_HELD` without it). A `search-knowledge` or `get-document` result from a `builtin` tool counts toward `runtime.generations.knowledge_results.total` whatever this says."
        }
      }
    },
    "TagBag": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "x-cli-flag-name": "tags",
      "description": "Key-value labels on a resource. A flat object of string values — an array, a nested object or a number is rejected with `400 VALIDATION_FAILED`, never coerced. Keys are opaque and stored verbatim, so `cost_center` and `costCenter` are two different tags. Matched by JSONB containment wherever tags are read: the `?tags=` filter, knowledge search, and the IAM `iam:ResourceTag/<key>` condition.\n\nKeys beginning `system.` are reserved: the platform writes them to record which conversation, actor, agent and role a row came from, and a write naming one is refused with `400 RESERVED_TAG_KEY`. They are read and filtered like any other tag.\n\nThe bag is bounded, because every pair reaches the IAM context of every access check on the resource: at most 50 keys, each key at most 128 characters and each value at most 256. A write past a bound — including a merge that would grow the stored bag past the key count — is `400 VALIDATION_FAILED` with `meta.limit` naming the bound it crossed. `system.*` keys are the platform's and do not count against the 50."
    },
    "ToolBinding": {
      "type": "object",
      "additionalProperties": false,
      "description": "One agent↔tool attachment. Exactly one of `tool_id` (persisted tool reference) or `tool` (inline ephemeral definition) per entry. Tool-call gating is owned by [Guardrails](/docs/modules/guardrails), attached via `guardrail_ids` on the project, agent, or tool — not on the binding.",
      "properties": {
        "tool_id": {
          "x-naturali-ref": "tools",
          "type": "string",
          "description": "Public ID of a persisted tool in the agent's own project (`400 TOOL_NOT_FOUND` otherwise). Exactly one of `tool_id`/`tool`."
        },
        "tool": {
          "$ref": "#/$defs/CreateToolRequest"
        }
      }
    },
    "ToolExecuteAuthConfig": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "description": "Computed request credential, for a target whose `Authorization` value cannot be expressed as a static header. `aws_sigv4` requires `region`, `service`, `access_key_id` and `secret_access_key`; `gcp_service_account` requires `credentials` and `scopes`; `oauth_connection` requires `oauth_client_id`. Every credential field takes a `{{secret:...}}` reference; a literal is refused with `400 LITERAL_CREDENTIAL`.",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "aws_sigv4",
            "gcp_service_account",
            "oauth_connection"
          ],
          "description": "Which credential is computed."
        },
        "region": {
          "type": [
            "string",
            "null"
          ],
          "description": "`aws_sigv4`: the signing region, e.g. `us-east-1`."
        },
        "service": {
          "type": [
            "string",
            "null"
          ],
          "description": "`aws_sigv4`: the signing service, e.g. `execute-api`."
        },
        "access_key_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "`aws_sigv4`: the access key id."
        },
        "secret_access_key": {
          "type": [
            "string",
            "null"
          ],
          "description": "`aws_sigv4`: the secret access key, as a `{{secret:...}}` reference; a literal is refused."
        },
        "session_token": {
          "type": [
            "string",
            "null"
          ],
          "description": "`aws_sigv4`: the session token of a temporary credential, as a reference, like `secret_access_key`."
        },
        "credentials": {
          "type": [
            "string",
            "null"
          ],
          "description": "`gcp_service_account`: the service account key file JSON, as a reference to a secret holding it, like `secret_access_key`."
        },
        "scopes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "`gcp_service_account`: the OAuth scopes to mint the token for."
        },
        "oauth_client_id": {
          "x-naturali-ref": "oauth-clients",
          "type": [
            "string",
            "null"
          ],
          "description": "`oauth_connection`: the OAuth client whose connection the turn's actor holds."
        }
      }
    },
    "ToolExecuteConfig": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "description": "Execution config for http tools. An `http` tool without a non-empty `url` is `400 VALIDATION_FAILED`, on create and on an update that would leave it without one. Supported fields: `url` (required), `method` (default `POST`), `headers`, `body_mode` and `response_mode`. The `url` may contain `{paramName}` placeholders (e.g. `/users/{userId}`) that are replaced at call time with the corresponding tool argument value (URL-encoded). Arguments consumed as path parameters are excluded from the query string and request body. `body_mode` is `json` (default) or `multipart`. In `multipart` mode the merged tool arguments are sent as a `multipart/form-data` body: scalar fields become plain form fields and a field shaped like `{ content_type, filename, data_base64 }` is decoded from base64 and attached as a file part (the hardcoded `Content-Type: application/json` is dropped so `fetch` sets the multipart boundary itself). `response_mode` is `json` (default: the body parsed as JSON, else returned as text) or `base64`, which returns a 2xx body as `{ content_type, filename, data_base64 }` — the same file shape `multipart` accepts, so a pipeline step can relay a downloaded file. `filename` comes from `Content-Disposition` and is omitted when the target names none. In either mode a 2xx body over `TOOL_RESPONSE_MAX_BYTES` is `502 TOOL_RESPONSE_TOO_LARGE`; a non-2xx body over it is cut to it.\n\n`auth` adds a computed request credential, for targets whose `Authorization` value cannot be expressed as a static header. Supported `auth.type` values:\n\n- `aws_sigv4` — signs the request with AWS Signature Version 4. Requires `region`, `service`, `access_key_id` and `secret_access_key`; `session_token` is optional (temporary credentials). Incompatible with `body_mode: multipart`, whose body bytes are not known at signing time.\n- `gcp_service_account` — mints a Google OAuth 2.0 access token from a signed service account assertion and sends it as a bearer token. Requires `credentials` (the service account key file JSON, as a string) and `scopes` (a non-empty array). Tokens are cached per service account and scope set until shortly before they expire.\n- `oauth_connection` — sends the access token of the OAuth connection the turn's actor holds through `oauth_client_id`, refreshing it when it expires. The call is refused unless both the caller and the agent's `policy_ids` allow `oauth-connections:UseOauthConnection` on the connection. With no actor it fails with `TOOL_AUTH_FAILED`; for an actor holding no connected connection, `409 OAUTH_CONNECTION_REQUIRED` naming how to reconnect.\n\nCredential fields accept `{{secret:...}}` references and should use them — a tool is readable by anyone who can `GET /tools`, and the stored reference is what is echoed back, never the resolved value.\n\nA credential slot takes a reference, never a literal: a literal `secret_access_key`, `session_token` or `credentials` under `auth`, a literal credential-named `headers` value (`Authorization`, `Cookie`, or a name containing `api-key`/`token`/`secret`/`password`), or a `url` carrying a password or a literal credential-named query parameter (those names, plus `key` and `sig`/`signature`) is refused with `400 LITERAL_CREDENTIAL`, `meta.paths` naming each one. A stored literal reads back as `{\"no_echo\": true}` (a `url` holding one is masked whole), an object rather than a string so a read-edit-write round trip fails the schema check instead of writing the placeholder in as the credential. A value carrying a `{{secret:...}}` reference is the wiring, not the credential, and stays readable.\n\n`headers` values additionally accept `{{context:<key>}}` references, resolved per call from the caller's `tool_context`, so a per-user credential can be placed in the real header the target expects (`Authorization: Bearer {{context:ocaToken}}`) instead of only in an `X-Naturali-Context-<key>` header. Valid **only** inside `headers` — a context value is caller-supplied, so it may not steer the `url` — and a key missing from the `tool_context` at call time fails the tool call with `MISSING_TOOL_CONTEXT_KEY` rather than sending an empty credential. See the Tool Context reference.\n",
      "properties": {
        "url": {
          "type": "string",
          "description": "Endpoint URL. May carry `{paramName}` placeholders resolved from the tool arguments at call time."
        },
        "method": {
          "type": [
            "string",
            "null"
          ],
          "description": "HTTP method (default: `POST`)"
        },
        "headers": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": "string"
          },
          "description": "Static headers sent on every request. Values accept `{{secret:...}}` and `{{context:<key>}}` references."
        },
        "body_mode": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "json",
            "multipart",
            null
          ],
          "description": "Request body encoding. Incompatible with `auth.type: aws_sigv4`."
        },
        "response_mode": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "json",
            "base64",
            null
          ],
          "description": "How a 2xx response body is returned. `base64` returns `{ content_type, filename, data_base64 }` for binary targets."
        },
        "auth": {
          "$ref": "#/$defs/ToolExecuteAuthConfig"
        }
      }
    },
    "ToolMcpConfig": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "description": "MCP server config (`url`, `headers`). `headers` values accept `{{secret:...}}` and `{{context:<key>}}` references, resolved right before the outbound MCP request; `url` accepts `{{secret:...}}` only. A literal credential in `headers` or `url` is refused, exactly as in `execute`.",
      "properties": {
        "url": {
          "type": "string",
          "description": "MCP server URL. Accepts a `{{secret:...}}` reference."
        },
        "headers": {
          "type": [
            "object",
            "null"
          ],
          "additionalProperties": {
            "type": "string"
          },
          "description": "Headers sent on every MCP request. Values accept `{{secret:...}}` and `{{context:<key>}}` references."
        },
        "pin_definitions": {
          "type": "boolean",
          "description": "Pin each action's definition on the first listing an agent turn makes, and withhold from the model any action whose `name`, `title`, `description`, `inputSchema`, `outputSchema` or `annotations` later differ from its pin, or that has none. Each drift files one `mcp_definition_drift` exception. Default `false`. Only a persisted tool pins."
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/naturali-ai-create-agent-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.