agent-as-model
v0.2.0A true MCP server where the agent is the model and the API key.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
chat_complete
Generate a chat completion from an OpenAI chat-completions-shaped request. The completion is produced by the host agent's own model: direct MCP sampling on pre-2026-07-28 connections, an MRTR InputRequiredResult carrying the request payload on 2026-07-28+. When output_schema is given, the request carries exactly one required tool whose input schema is that schema, and the validated structured completion is returned as JSON text. When tools is given, the tool definitions are forwarded to the host's model with tool_choice, but only if the host advertised the sampling.tools capability: otherwise…
| Parameter | Type | Description |
|---|---|---|
messages * | array | Chat messages; system roles become the system prompt. |
max_tokens | integer | Maximum tokens to generate. |
model | string | Model alias; agent-default means the host's own model. |
output_schema | Optional JSON Schema (root type object). When given, the sampling request carries exactly one required tool with this input schema and the completion is validated against it before returning. | |
persona | Optional persona contract for this call: {name, input_schema, output_schema}. name is required and non-empty; the server is stateless and keeps no persona registry. When input_schema is given, the req… | |
previous_response_id | Optional session cursor for host-owned multi-turn continuations. The server keeps no session state: pass the accumulated history back in messages and the previous turn's cursor here. '' starts a curso… | |
temperature | Sampling temperature, if the host honors it. | |
tool_choice | Optional tool-choice mode, forwarded with tools; defaults to 'auto' when tools are given. | |
tools | Optional tool definitions to forward to the host's model. Each is {name, description, input_schema} where input_schema is a JSON Schema object with root type 'object'. Forwarded only when the host adv… |
messages_create
Generate a completion from an Anthropic messages-shaped request. The completion is produced by the host agent's own model: direct MCP sampling on pre-2026-07-28 connections, an MRTR InputRequiredResult carrying the request payload on 2026-07-28+. When output_schema is given, the request carries exactly one required tool whose input schema is that schema, and the validated structured completion is returned as JSON text. When tools is given, the tool definitions are forwarded to the host's model with tool_choice, but only if the host advertised the sampling.tools capability: otherwise the tools…
| Parameter | Type | Description |
|---|---|---|
messages * | array | User/assistant messages in order. |
max_tokens | integer | Maximum tokens to generate. |
model | string | Model alias; agent-default means the host's own model. |
output_schema | Optional JSON Schema (root type object). When given, the sampling request carries exactly one required tool with this input schema and the completion is validated against it before returning. | |
persona | Optional persona contract for this call: {name, input_schema, output_schema}. name is required and non-empty; the server is stateless and keeps no persona registry. When input_schema is given, the req… | |
previous_response_id | Optional session cursor for host-owned multi-turn continuations. The server keeps no session state: pass the accumulated history back in messages and the previous turn's cursor here. '' starts a curso… | |
system | System prompt as text or text blocks. | |
temperature | Sampling temperature, if the host honors it. | |
tool_choice | Optional tool-choice mode, forwarded with tools; defaults to 'auto' when tools are given. | |
tools | Optional tool definitions to forward to the host's model. Each is {name, description, input_schema} where input_schema is a JSON Schema object with root type 'object'. Forwarded only when the host adv… |
responses_create
Generate a completion from an OpenAI Responses-shaped request, returning the Responses API response object. The completion is produced by the host agent's own model: direct MCP sampling on pre-2026-07-28 connections, an MRTR InputRequiredResult carrying the request payload on 2026-07-28+. `input` is a string or a list of input items; each item is {role, content} with role user, assistant, system, or developer, and content a string or a list of text parts ({type: 'input_text'|'text', input_text: '...'}). A string input becomes one user message. System and developer items fold into the system pr…
| Parameter | Type | Description |
|---|---|---|
input * | The Responses API input: a string, which becomes one user message, or a list of input items {role, content}. role is user, assistant, system, or developer; content is a string or a list of text parts… | |
instructions | Optional system prompt; leads the system/developer items. | |
max_tokens | integer | Maximum tokens to generate. Named max_tokens for uniformity with the other tools; the Responses API calls it max_output_tokens. |
model | string | Model alias; agent-default means the host's own model. |
output_schema | Optional JSON Schema (root type object). When given, the sampling request carries exactly one required tool with this input schema and the completion is validated against it before returning. | |
persona | Optional persona contract for this call: {name, input_schema, output_schema}. name is required and non-empty; the server is stateless and keeps no persona registry. When input_schema is given, the req… | |
previous_response_id | Optional session cursor for host-owned multi-turn continuations. The server keeps no session state: pass the accumulated history back in input and the previous turn's response id here. '' starts a cur… | |
temperature | Sampling temperature, if the host honors it. | |
tool_choice | Optional tool-choice mode, forwarded with tools; defaults to 'auto' when tools are given. | |
tools | Optional tool definitions to forward to the host's model. Each is {name, description, input_schema} where input_schema is a JSON Schema object with root type 'object'. Forwarded only when the host adv… |
generate
Generate a raw text completion from a plain prompt string. The prompt is sent as a single user sampling message with no system prompt and no chat formatting: raw prompt in, completion text out, produced by the host agent's own model. Same model hint and parameters as the other completion tools, minus any chat or tool features: no tools, no output_schema, no tool_choice. It does accept the optional persona contract ({name, input_schema, output_schema}): request/response validation only, never a sampling feature, so the thin path stays zero overhead. Session cursors: the server keeps no session…
| Parameter | Type | Description |
|---|---|---|
prompt * | string | The raw prompt text to complete. No chat formatting applied. |
max_tokens | integer | Maximum tokens to generate. |
model | string | Model alias; agent-default means the host's own model. |
persona | Optional persona contract for this call: {name, input_schema, output_schema}. name is required and non-empty; the server is stateless and keeps no persona registry. When input_schema is given, the req… | |
previous_response_id | Optional session cursor for host-owned continuations. '' mints a cursor over the current prompt and completion, returned as JSON '{"completion": "<text>", "response_id": "cur_<...>"}' instead of plain… | |
temperature | Sampling temperature, if the host honors it. |
list_models
List the models this server offers. There is exactly one: agent-default, an alias for the host agent's own model.