assistant_context
Input and output schemas
{
"inputSchema": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"properties": {
"shared": {
"type": "boolean",
"description": "False when the operator has shared nothing yet, in which case every other field is absent. Not an error and not an empty screen: it means nobody has told this server what is on it."
},
"url": {
"type": [
"string",
"null"
],
"description": "The console route the operator is on, or null."
},
"concepts": {
"type": "array",
"items": {
"type": "string"
},
"description": "The titles of the explain concepts that screen declares \u2014 what the surface itself says it is about."
},
"document": {
"type": [
"object",
"null"
],
"description": "The document the operator's editor is showing, or null when they are not in an editor.",
"properties": {
"path": {
"type": "string",
"description": "The document's path, as the console holds it. This is the answer to `which file` \u2014 do not ask."
},
"text": {
"type": "string",
"description": "The document's current text, INCLUDING unsaved edits. It may differ from what is on disk; this is what the operator is looking at."
},
"selection": {
"type": [
"object",
"null"
],
"description": "The selected range, or null when nothing is selected and the whole document is offered. Lines and columns are ONE-based here, matching what the operator reads off the gutter.",
"properties": {
"from_line": {
"type": "integer",
"minimum": 1
},
"from_column": {
"type": "integer",
"minimum": 1
},
"to_line": {
"type": "integer",
"minimum": 1
},
"to_column": {
"type": "integer",
"minimum": 1
}
},
"required": [
"from_line",
"from_column",
"to_line",
"to_column"
],
"additionalProperties": false
},
"cursor": {
"type": [
"object",
"null"
],
"description": "Where the operator's caret is, ONE-based like the selection, or null when the document did not come from a live editor. With no selection this is the line the operator means by `here`.",
"properties": {
"line": {
"type": "integer",
"minimum": 1
},
"column": {
"type": "integer",
"minimum": 1
}
},
"required": [
"line",
"column"
],
"additionalProperties": false
}
},
"required": [
"path",
"text"
],
"additionalProperties": false
},
"revision": {
"type": "integer",
"description": "The shared document's revision: how many edit batches have been recorded for this conversation. Compare it with the revision your last `assistant_document_edit` returned \u2014 a larger jump than your own edits explain means the document moved under you, so re-read before quoting bytes from an older read."
}
},
"required": [
"shared"
],
"additionalProperties": false
}
}assistant_document_edit
The edit updates the shared editor buffer atomically. Saving remains the operator’s action.
Input and output schemas
{
"inputSchema": {
"type": "object",
"properties": {
"edits": {
"type": "array",
"minItems": 1,
"description": "The operations, applied in order, each against the text the previous one produced.",
"items": {
"type": "object",
"properties": {
"old_string": {
"type": "string",
"description": "The exact bytes to replace. Must occur exactly once; quote more surrounding text to make an ambiguous match unique."
},
"new_string": {
"type": "string",
"description": "What replaces them."
}
},
"required": [
"old_string",
"new_string"
],
"additionalProperties": false
}
}
},
"required": [
"edits"
],
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"properties": {
"applied": {
"type": "integer",
"description": "How many edits the batch carried \u2014 all of them applied."
},
"revision": {
"type": "integer",
"description": "The shared document's revision after this batch."
},
"path": {
"type": "string",
"description": "The document that was edited, by the path the console shared."
}
},
"required": [
"applied",
"revision",
"path"
],
"additionalProperties": false
}
}assistant_document_check
Input and output schemas
{
"inputSchema": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
},
"outputSchema": {
"type": "object",
"properties": {
"ok": {
"type": "boolean",
"description": "True when the document would deploy: no diagnostics."
},
"diagnostics": {
"type": "array",
"description": "Every diagnostic, in document order. Lines and columns are the numbers the operator reads off their gutter.",
"items": {
"type": "object",
"properties": {
"line": {
"type": "integer"
},
"column": {
"type": "integer"
},
"message": {
"type": "string"
}
},
"required": [
"line",
"column",
"message"
],
"additionalProperties": false
}
}
},
"required": [
"ok",
"diagnostics"
],
"additionalProperties": false
}
}Read the tool cards for behavior and the assistant for the editing loop.