> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit Input Request Response

> Submit a human input response for a durable input request.

export const McpToolCall = ({tool, initialArguments = {}}) => {
  const endpoint = "https://api.veryfront.com/mcp";
  const tokenStorageKey = 'veryfront.docs.mcpBearerToken';
  const escapeHtml = value => value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  const highlightJson = value => {
    const escaped = escapeHtml(value);
    return escaped.replace(/("(?:\\u[a-fA-F0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+\-]?\d+)?)/g, match => {
      let color = '#f3f4f6';
      if (match.endsWith(':')) {
        color = '#7dd3fc';
      } else if (match.startsWith('"')) {
        color = '#86efac';
      } else if ((/true|false/).test(match)) {
        color = '#c4b5fd';
      } else if ((/null/).test(match)) {
        color = '#fcd34d';
      } else {
        color = '#67e8f9';
      }
      return `<span style="color: ${color}">${match}</span>`;
    });
  };
  const expandJsonStrings = value => {
    if (typeof value === 'string') {
      const trimmed = value.trim();
      if (trimmed.startsWith('{') && trimmed.endsWith('}') || trimmed.startsWith('[') && trimmed.endsWith(']')) {
        try {
          return expandJsonStrings(JSON.parse(trimmed));
        } catch {}
      }
      return value;
    }
    if (Array.isArray(value)) {
      return value.map(expandJsonStrings);
    }
    if (value && typeof value === 'object') {
      return Object.fromEntries(Object.entries(value).map(([key, nestedValue]) => [key, expandJsonStrings(nestedValue)]));
    }
    return value;
  };
  const formatJson = value => {
    try {
      return JSON.stringify(expandJsonStrings(value), null, 2);
    } catch {
      return String(value);
    }
  };
  const formatResponseText = text => {
    const trimmed = text.trim();
    if (!trimmed) return 'No response body.';
    try {
      return formatJson(JSON.parse(trimmed));
    } catch {}
    const ssePayloads = trimmed.split(/\n\n+/).flatMap(chunk => chunk.split('\n').filter(line => line.startsWith('data:')).map(line => line.slice(5).trim()).filter(Boolean));
    for (let index = ssePayloads.length - 1; index >= 0; index -= 1) {
      try {
        return formatJson(JSON.parse(ssePayloads[index]));
      } catch {}
    }
    return trimmed;
  };
  const readStoredToken = () => {
    if (typeof window === 'undefined') return '';
    try {
      return window.sessionStorage.getItem(tokenStorageKey) || '';
    } catch {
      return '';
    }
  };
  const writeStoredToken = value => {
    if (typeof window === 'undefined') return;
    try {
      if (value) {
        window.sessionStorage.setItem(tokenStorageKey, value);
      } else {
        window.sessionStorage.removeItem(tokenStorageKey);
      }
    } catch {}
  };
  const [token, setToken] = useState(readStoredToken);
  const [argumentText, setArgumentText] = useState(formatJson(initialArguments));
  const [status, setStatus] = useState('Ready');
  const [response, setResponse] = useState('No response yet.');
  const [copied, setCopied] = useState(false);
  const callTool = async () => {
    if (!token.trim()) {
      setStatus('Paste a bearer token first.');
      return;
    }
    let parsedArguments;
    try {
      parsedArguments = argumentText.trim() ? JSON.parse(argumentText) : {};
    } catch {
      setStatus('Input must be valid JSON.');
      return;
    }
    const body = {
      jsonrpc: '2.0',
      id: Date.now(),
      method: 'tools/call',
      params: {
        name: tool,
        arguments: parsedArguments
      }
    };
    setStatus('Calling tool...');
    setResponse(formatJson(body));
    try {
      const result = await fetch(endpoint, {
        method: 'POST',
        headers: {
          accept: 'application/json, text/event-stream',
          'content-type': 'application/json',
          authorization: `Bearer ${token.trim()}`,
          'x-veryfront-origin': 'docs-mcp-tool-page'
        },
        body: JSON.stringify(body)
      });
      const text = await result.text();
      setStatus(result.ok ? 'Response received.' : `Request failed with HTTP ${result.status}.`);
      setResponse(formatResponseText(text));
    } catch (error) {
      setStatus('Request failed.');
      setResponse(error instanceof Error ? error.message : String(error));
    }
  };
  const copyResponse = async () => {
    try {
      await navigator.clipboard.writeText(response);
      setCopied(true);
      setTimeout(() => setCopied(false), 1500);
    } catch {
      setStatus('Copy failed.');
    }
  };
  return <div className="not-prose my-6 rounded-xl border border-gray-200 bg-white p-4 dark:border-gray-800 dark:bg-gray-950">
      <div className="mb-4">
        <div className="text-sm font-semibold text-gray-900 dark:text-gray-100">MCP tool call</div>
        <div className="mt-1 text-sm text-gray-600 dark:text-gray-400">
          Call <code>{tool}</code> against the Veryfront MCP endpoint.
        </div>
      </div>

      <label className="mb-2 block text-sm font-medium text-gray-900 dark:text-gray-100" htmlFor={`${tool}-token`}>
        Bearer token
      </label>
      <input id={`${tool}-token`} className="mb-4 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100" type="password" value={token} onChange={event => {
    const value = event.target.value;
    setToken(value);
    writeStoredToken(value);
  }} placeholder="Paste API key or JWT" />

      <label className="mb-2 block text-sm font-medium text-gray-900 dark:text-gray-100" htmlFor={`${tool}-arguments`}>
        Input JSON
      </label>
      <textarea id={`${tool}-arguments`} className="mb-4 min-h-40 w-full rounded-md border border-gray-300 bg-white px-3 py-2 font-mono text-sm text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100" value={argumentText} onChange={event => setArgumentText(event.target.value)} spellCheck={false} />

      <button className="rounded-md bg-gray-900 px-3 py-2 text-sm font-medium text-white hover:bg-gray-700 dark:bg-gray-100 dark:text-gray-950 dark:hover:bg-gray-300" type="button" onClick={callTool}>
        Call tool
      </button>

      <div className="mt-4 text-sm font-medium text-gray-900 dark:text-gray-100">{status}</div>
      <div className="mt-3 overflow-hidden rounded-md border border-gray-300 dark:border-gray-700">
        <div className="flex items-center justify-between bg-gray-100 px-3 py-2 text-sm font-medium text-gray-900 dark:bg-gray-900 dark:text-gray-100">
          <span>Output JSON</span>
          <button className="rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-900 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-950 dark:text-gray-100 dark:hover:bg-gray-800" type="button" onClick={copyResponse}>
            {copied ? 'Copied' : 'Copy'}
          </button>
        </div>
      <pre className="max-h-96 overflow-auto whitespace-pre-wrap break-words bg-gray-950 p-4 text-sm text-gray-100">
        <code dangerouslySetInnerHTML={{
    __html: highlightJson(response)
  }} />
      </pre>
      </div>
    </div>;
};

Submit a human input response for a durable input request.

## Tool details

| Field | Value                           |
| ----- | ------------------------------- |
| Name  | `submit_input_request_response` |
| Group | Conversations                   |

## Playground

<McpToolCall
  tool="submit_input_request_response"
  initialArguments={{
"conversation_id": "",
"input_request_id": "",
"values": {}
}}
/>

## Input schema

```json title="Input schema" theme={null}
{
  "type": "object",
  "properties": {
    "conversation_id": {
      "type": "string",
      "format": "uuid",
      "description": "Conversation identifier that scopes the request."
    },
    "input_request_id": {
      "type": "string",
      "format": "uuid",
      "description": "Provide the input request id."
    },
    "values": {
      "type": "object",
      "additionalProperties": {
        "type": [
          "string",
          "boolean",
          "number",
          "null"
        ],
        "description": "Additional structured values supplied to the tool."
      },
      "description": "Structured values submitted to the tool."
    }
  },
  "required": [
    "conversation_id",
    "input_request_id",
    "values"
  ],
  "additionalProperties": false,
  "description": "Input schema for the submit_input_request_response tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
```

## Output schema

```json title="Output schema" theme={null}
{
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean",
      "const": true,
      "description": "Always true when the response was accepted by the API layer."
    },
    "input_request": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Input request identifier."
        },
        "conversation_id": {
          "type": "string",
          "format": "uuid",
          "description": "Conversation identifier that owns the request."
        },
        "run_id": {
          "type": "string",
          "description": "Agent run identifier waiting on this request."
        },
        "tool_call_id": {
          "type": "string",
          "description": "Tool call identifier that triggered the request."
        },
        "kind": {
          "type": "string",
          "description": "Input request interaction type."
        },
        "status": {
          "type": "string",
          "description": "Lifecycle status of the request."
        },
        "requested_responder_type": {
          "type": "string",
          "description": "Responder type expected to answer the request."
        },
        "title": {
          "type": "string",
          "description": "Short prompt shown to the responder."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "Long-form guidance explaining the requested input."
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": {
              "description": "Additional structured values associated with this result."
            },
            "description": "One field item associated with this record."
          },
          "description": "Field definitions that the responder must complete."
        },
        "recommendations": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": {
                "description": "Additional structured values associated with this result."
              },
              "description": "Suggested values or defaults associated with the record."
            },
            {
              "type": "null",
              "description": "Suggested values or defaults returned by the tool."
            }
          ],
          "description": "Suggested values or defaults for the responder."
        },
        "metadata": {
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": {
                "description": "Additional structured values associated with this result."
              },
              "description": "Additional structured metadata for the record."
            },
            {
              "type": "null",
              "description": "Additional structured metadata returned by the tool."
            }
          ],
          "description": "Additional machine-readable metadata for rendering or orchestration."
        },
        "created_at": {
          "type": "string",
          "description": "Timestamp when the request was created."
        },
        "expires_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Timestamp when the request expires, or null when it does not expire."
        },
        "submitted_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Timestamp when a response was submitted."
        },
        "cancelled_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Timestamp when the request was cancelled."
        },
        "expired_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Timestamp when the request expired."
        },
        "latest_response": {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Input response identifier."
                },
                "input_request_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Input request identifier that this response answers."
                },
                "conversation_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Conversation identifier associated with the request and response."
                },
                "run_id": {
                  "type": "string",
                  "description": "Agent run identifier that is waiting for or consumed this response."
                },
                "actor_type": {
                  "type": "string",
                  "description": "Actor type that submitted the response, such as human or agent."
                },
                "actor_id": {
                  "type": "string",
                  "description": "Actor identifier that submitted the response."
                },
                "values": {
                  "type": "object",
                  "additionalProperties": {
                    "type": [
                      "string",
                      "number",
                      "boolean",
                      "null"
                    ],
                    "description": "Additional structured values associated with this result."
                  },
                  "description": "Submitted field values keyed by input request field name."
                },
                "created_at": {
                  "type": "string",
                  "description": "Timestamp when the response was created."
                }
              },
              "required": [
                "id",
                "input_request_id",
                "conversation_id",
                "run_id",
                "actor_type",
                "actor_id",
                "values",
                "created_at"
              ],
              "additionalProperties": false,
              "description": "Submitted response to a structured input request."
            },
            {
              "type": "null",
              "description": "The latest response returned by the tool."
            }
          ],
          "description": "Most recent submitted response, or null when unanswered."
        }
      },
      "required": [
        "id",
        "conversation_id",
        "run_id",
        "tool_call_id",
        "kind",
        "status",
        "requested_responder_type",
        "title",
        "description",
        "fields",
        "recommendations",
        "metadata",
        "created_at",
        "expires_at",
        "submitted_at",
        "cancelled_at",
        "expired_at",
        "latest_response"
      ],
      "additionalProperties": false,
      "description": "Input request after applying the submitted response."
    },
    "input_response": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/id",
          "description": "Unique identifier for the returned record."
        },
        "input_request_id": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/input_request_id",
          "description": "The input request id returned by the tool."
        },
        "conversation_id": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/conversation_id",
          "description": "Conversation identifier associated with this result."
        },
        "run_id": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/run_id",
          "description": "Run identifier associated with this result."
        },
        "actor_type": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/actor_type",
          "description": "Type of actor associated with this result."
        },
        "actor_id": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/actor_id",
          "description": "Identifier for the actor associated with this result."
        },
        "values": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/values",
          "description": "Structured values returned by the tool."
        },
        "created_at": {
          "$ref": "#/properties/input_request/properties/latest_response/anyOf/0/properties/created_at",
          "description": "Creation timestamp in ISO 8601 format."
        }
      },
      "required": [
        "id",
        "input_request_id",
        "conversation_id",
        "run_id",
        "actor_type",
        "actor_id",
        "values",
        "created_at"
      ],
      "additionalProperties": false,
      "description": "Submitted response record that was persisted."
    },
    "accepted": {
      "type": "boolean",
      "description": "Whether the response was accepted for processing."
    },
    "duplicate": {
      "type": "boolean",
      "description": "Whether the submitted payload duplicated an existing response."
    }
  },
  "required": [
    "success",
    "input_request",
    "input_response",
    "accepted"
  ],
  "additionalProperties": false,
  "description": "Result returned after submitting a response to an input request.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}
```
