Skip to content
Developer Preview

HookRequestResult

Experimental

hook/request result: the hook’s answer, the shared HookAnswers member of its event, as the hook tool’s structuredContent gave it. Each answer has the word answer and the members of its kind.

  • answer — Experimental
  • context — Experimental
  • input — Experimental
  • prompt — Experimental
  • reason — Experimental
Source

schema/msp/experimental/msp.schema.json#/types/HookRequestResult

{
"description": "`hook/request` result: the hook's answer, the shared\n`HookAnswers` member of its event, as the hook tool's `structuredContent`\ngave it. Each answer has the word `answer` and the members of its kind.",
"properties": {
"answer": {
"$ref": "#/$defs/HookAnswerKind",
"description": "What the hook answered."
},
"context": {
"description": "Text for the model, for `continue` and a prompt `rewrite`.",
"type": "string"
},
"input": {
"description": "The new tool input, for a `preToolUse` `rewrite`.",
"properties": {},
"type": "object"
},
"prompt": {
"description": "The new prompt, for a `userPromptSubmit` `rewrite`.",
"type": "string"
},
"reason": {
"description": "Why, for `deny`, `ask` and `block`.",
"type": "string"
}
},
"required": [
"answer"
],
"type": "object",
"x-msp-descriptor": "hook/request",
"x-msp-stability": "experimental"
}