Skip to content

Commit adc1791

Browse files
olaservoclaude
andcommitted
fix(spec): simplify ExecutionFormState to use lastToolResult
Replace toolResponseHistory array with single lastToolResult field. History is the source of truth for execution records - no need to duplicate in UI state. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d755666 commit adc1791

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

specification/v2_storage.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Status:** Draft
44
**Issue:** [#983](https://github.com/modelcontextprotocol/inspector/issues/983)
5-
**Last Updated:** 2026-01-19
5+
**Last Updated:** 2026-02-01
66

77
## Overview
88

@@ -169,7 +169,7 @@ See [v2_tech_stack.md](./v2_tech_stack.md#pino-rationale) for Pino configuration
169169
| **Execution State** | useReducer + Context | Complex transitions with pending requests; already implemented in ExecutionContext |
170170
| **User Preferences** | Zustand + persist | Simple key-value; needs persistence; avoids prop drilling |
171171
| **Logs Display** | Zustand | Real-time buffer; filter state; pause/resume |
172-
| **Execution Forms** | Zustand | Form values; selected items; response history |
172+
| **Execution Forms** | Zustand | Form values; selected items; last result display |
173173
| **Testing Profiles** | Zustand + persist | User configurations; active selection |
174174
| **Server Configs** | Repository (proxy API) | Per spec constraint; not browser storage |
175175
| **History Data** | Repository interface | Storage implementation deferred |
@@ -286,7 +286,7 @@ interface ExecutionFormState {
286286
// Tools
287287
selectedToolName: string | null;
288288
toolFormValues: Record<string, unknown>;
289-
toolResponseHistory: ToolResponse[];
289+
lastToolResult: ToolResult | null;
290290

291291
// Resources
292292
selectedResourceUri: string | null;
@@ -298,8 +298,7 @@ interface ExecutionFormState {
298298
promptMessages: unknown[] | null;
299299
}
300300

301-
interface ToolResponse {
302-
id: string;
301+
interface ToolResult {
303302
toolName: string;
304303
args: Record<string, unknown>;
305304
result: unknown;
@@ -311,8 +310,7 @@ interface ToolResponse {
311310
interface ExecutionFormActions {
312311
selectTool: (name: string | null) => void;
313312
setToolFormValues: (values: Record<string, unknown>) => void;
314-
addToolResponse: (response: ToolResponse) => void;
315-
clearToolHistory: () => void;
313+
setLastToolResult: (result: ToolResult | null) => void;
316314

317315
selectResource: (uri: string | null) => void;
318316
setResourceContent: (content: unknown | null) => void;
@@ -325,7 +323,7 @@ interface ExecutionFormActions {
325323
}
326324
```
327325

328-
**History cap:** 50 tool responses
326+
**Note:** Full execution history is persisted server-side via Pino/NDJSON and accessed through the History API. The `lastToolResult` field provides immediate display of the most recent result without duplicating the history store.
329327

330328
### 4. Testing Profiles Store
331329

0 commit comments

Comments
 (0)