new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

MCP · Specification · all subjects

input-required

74 notes in this subject, read out of this brain and free to use. This is page 2 of 2.

NumberSchema fields for elicitation

NumberSchema has `type: "number" | "integer"` (required) plus optional `title`, `description`, `minimum?: number`, `maximum?: number`, and `default?: number`.

BooleanSchema fields for elicitation

BooleanSchema has `type: "boolean"` (required) plus optional `title?: string`, `description?: string`, and `default?: boolean`.

EnumSchema union: single-select, multi-select, legacy

EnumSchema = SingleSelectEnumSchema | MultiSelectEnumSchema | LegacyTitledEnumSchema. SingleSelectEnumSchema = UntitledSingleSelectEnumSchema | TitledSingleSelectEnumSchema; MultiSelectEnumSchema = UntitledMultiSelectEnumSchema | TitledMultiSelectEnumSchema.

TitledSingleSelectEnumSchema uses oneOf with const/title

TitledSingleSelectEnumSchema has `type: "string"`, optional `title` and `description`, required `oneOf: { const: string; title: string }[]` (each entry gives the enum value in `const` and its display label in `title`), and optional `default?: string`. Example: {"type": "string", "oneOf": [{"const": "#FF0000", "title": "Red"}, {"const": "#00FF00", "title": "Green"}], "default": "#FF0000"}.

TitledMultiSelectEnumSchema uses type array with items.anyOf

TitledMultiSelectEnumSchema has `type: "array"`, optional `title`, `description`, `minItems?: number`, `maxItems?: number`, required `items: { anyOf: { const: string; title: string }[] }`, and optional `default?: string[]`. Example: {"type": "array", "minItems": 1, "maxItems": 2, "items": {"anyOf": [{"const": "#FF0000", "title": "Red"}, {"const": "#0000FF", "title": "Blue"}]}, "default": ["#FF0000", "#00FF00"]}.

LegacyTitledEnumSchema with enumNames is deprecated

LegacyTitledEnumSchema has `type: "string"`, optional `title`/`description`, required `enum: string[]`, optional `enumNames?: string[]` (legacy display names, non-standard per JSON Schema 2020-12) and optional `default?: string`. It is deprecated: use TitledSingleSelectEnumSchema instead, as LegacyTitledEnumSchema will be removed in a future version.

UntitledMultiSelectEnumSchema (elicitation multi-select)

UntitledMultiSelectEnumSchema describes multiple-selection enumeration without display titles: {type: "array" (required), title?: string, description?: string, minItems?: number, maxItems?: number, items: { type: "string"; enum: string[] } (required), default?: string[]}. Example: {"type":"array","title":"Color Selection","description":"Choose your favorite colors","minItems":1,"maxItems":2,"items":{"type":"string","enum":["Red","Green","Blue"]},"default":["Red","Green"]}.

UntitledSingleSelectEnumSchema (elicitation single select)

UntitledSingleSelectEnumSchema describes single-selection enumeration without display titles: {type: "string" (required), title?: string, description?: string, enum: string[] (required), default?: string}. Example: {"type":"string","title":"Color Selection","description":"Choose your favorite color","enum":["Red","Green","Blue"],"default":"Red"}.

InputRequests map structure

InputRequests is a map of server-initiated requests that the client must fulfill. Keys are server-assigned identifiers (e.g. "github_login", "capital_of_france") and values are request objects containing `method` and `params` — for example {"method": "elicitation/create", "params": {"mode": "form", "message": "...", "requestedSchema": {...}}} or {"method": "sampling/createMessage", "params": {"messages": [...], "maxTokens": 100}}. Note the request objects have no `jsonrpc` or `id` fields.

InputRequiredResult fields and MUST rule

InputRequiredResult is sent by the server to indicate additional input is needed before the request can be completed. Its fields are `_meta?: ResultMetaObject`, `resultType: string` (value "input_required"), `inputRequests?: InputRequests`, `requestState?: string`, plus arbitrary additional keys. At least one of `inputRequests` or `requestState` MUST be present.

Example: InputRequiredResult with requestState only (load shedding)

A server may return only request state without input requests, e.g. {"resultType": "input_required", "requestState": "eyJwcm9ncmVzcyI6IjUwJSIsInN0YXRlIjoicHJvY2Vzc2luZyJ9"}. This pattern is described as load shedding. A fuller example includes both `inputRequests` (elicitation/create and sampling/createMessage entries) and `requestState`.

InputResponses map structure

InputResponses is a map of client responses to server-initiated requests; keys correspond to the keys in the InputRequests map and values are the client's result for each request. Example: {"github_login": {"action": "accept", "content": {"name": "octocat"}}, "capital_of_france": {"role": "assistant", "content": {"type": "text", "text": "The capital of France is Paris."}, "model": "claude-3-sonnet-20240307", "stopReason": "endTurn"}}.

resources/read response can be InputRequiredResult or ReadResourceResult

`ReadResourceResultResponse` has `jsonrpc: "2.0"`, `id: RequestId`, and `result: InputRequiredResult | ReadResourceResult`, so a client handling `resources/read` must be prepared for an elicitation-style input-required result as well as the completed read result.

CallToolResultResponse may be InputRequiredResult or CallToolResult

CallToolResultResponse is {jsonrpc: "2.0"; id: RequestId; result: InputRequiredResult | CallToolResult}. Clients handling tools/call responses must branch on the result's `resultType` to decide whether the tool completed or is requesting further input.

Give your agent this brain