Commit graph inspector/client
Author SHA1 Message Date
Cliff Hall
7fb2211bf2
Merge branch 'main' into fix-port-numbers 2025-05-29 11:41:10 -04:00
Basil Hosmer
d8a2821344
refactor: Address PR comments
- Extract tool results rendering into separate ToolResults component
- Hoist checkContentCompatibility function to module level following codebase conventions
- Add ajv@6.12.6 as direct dependency to client package.json
- All tests pass and linting is clean

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-28 22:18:19 -04:00
Basil Hosmer
5a628c7a00
fix: Fix lint errors
- Remove unused catch parameter in ToolsTab.tsx
- Replace 'as any' with @ts-expect-error in test for invalid schema

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-28 15:24:40 -04:00
Basil Hosmer
e7e4745464
fix: Fix TypeScript build errors in ToolsTab tests
The previous test implementation caused build failures due to Jest
hoisting issues with mock variables. This commit fixes the build by
removing mocking in favor of using real schema validation.

- Remove jest.mock() of schemaUtils module that caused initialization errors
- Add beforeEach to clear schema cache between tests
- Use cacheToolOutputSchemas() to set up test scenarios
- Let real validation logic run for more accurate tests
- All tests pass and build succeeds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-28 15:24:40 -04:00
Basil Hosmer
b184654ee5
style: Apply Prettier formatting to structured output code
Applied consistent formatting to ToolsTab.tsx and schemaUtils.ts
to fix linting issues. No functional changes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-28 15:24:40 -04:00
Basil Hosmer
cf1fb61de4
test: Add comprehensive tests for structured output validation
Added extensive test coverage for the new structured output features:

Schema Utilities Tests:
- Tests for cacheToolOutputSchemas function
- Tests for validateToolOutput with various scenarios
- Tests for getToolOutputValidator and hasOutputSchema helpers
- Coverage for valid/invalid schemas and edge cases
- Tests for nested object validation

ToolsTab Component Tests:
- Tests for output schema display and expand/collapse functionality
- Tests for structured content validation display
- Tests for validation error messages
- Tests for unstructured content title logic
- Tests for compatibility checking between structured/unstructured content
- Tests ensuring compatibility check only runs with output schemas

All tests passing with 100% coverage of new functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-28 15:24:40 -04:00
Basil Hosmer
de84c472ce
feat: Add structured output support to browser UI
This commit adds comprehensive support for structured output validation in tool calls,
following the MCP specification for tools with output schemas.

UI Changes:
1. Output Schema Display:
   - Added collapsible output schema section in ToolsTab
   - Shows output schemas after input fields, before the Run Tool button
   - Default view shows 8 lines with scrolling, expandable to full view
   - Expand/Collapse button with chevron icons for better UX

2. Structured Content Display:
   - New "Structured Content" section when tools return structuredContent
   - Shows structured data in a formatted JSON view
   - Validation status indicator (green checkmark for valid, red X for errors)
   - Detailed validation error messages when content doesn't match schema

3. Unstructured Content Labeling:
   - Added "Unstructured Content" heading when both structured and unstructured content exist
   - Only shows label when structured content is also present
   - Maintains clean UI when only unstructured content exists

4. Compatibility Checking:
   - Checks if unstructured content matches structured content (when output schema exists)
   - Shows compatibility status with blue (compatible) or yellow (incompatible) indicators
   - Detailed messages explain why content doesn't match
   - Only runs compatibility check for tools with output schemas

5. Validation Error Handling:
   - Shows error when tool with output schema doesn't return structured content
   - Clear error messages for schema validation failures
   - Maintains proper error state display

Technical Implementation:
- Added schema validation utilities using Ajv (same as SDK)
- Caches compiled validators for performance
- Validates on tool result display, not during the call
- Follows SDK's Client.callTool validation pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-05-28 15:24:40 -04:00
Paul Carleton
7b1299c730
[auth debugger] Make the quick flow use the same state machine as the step-by-step flow (#426)
* use state machine in quick flow

* clean up test

* rm some comments
2025-05-27 11:36:19 +01:00
Cliff Hall
c2610b6bb6
Merge branch 'main' into pcarleton/naming 2025-05-21 16:15:58 -04:00
ihrpr
7cf85b526a
update TS sdk 2025-05-21 20:56:25 +01:00
ihrpr
b0db14c3a7
0.13.0 bump version 2025-05-21 20:33:19 +01:00
Paul Carleton
df9ea1e8a4
rework naming 2025-05-20 19:51:48 +01:00
ihrpr
8ab5ac1476
remove null check 2025-05-20 18:21:33 +01:00
ihrpr
014ef7d35e
refactor 2025-05-20 17:25:44 +01:00
ihrpr
6b19ac3e3d
random issue when running build 2025-05-19 19:21:58 +01:00
ihrpr
2f6a9fca11
format 2025-05-19 19:03:22 +01:00
ihrpr
85ae0ede85
small fix 2025-05-19 18:36:50 +01:00
ihrpr
13eb077329
fix auth conect 2025-05-19 18:29:42 +01:00
Cliff Hall
eb190b637d
Merge branch 'main' into fix-port-numbers 2025-05-19 12:45:51 -04:00
Kamal Fariz Mahyuddin
c6fad3f923
fix: quick oauth flow could not transition to token_request due to missing server metadata (#407)
* fix: quick oauth flow could not transition to token_request due to missing server metadata

* chore: prettier fix
2025-05-16 16:22:39 +01:00
sumeetpardeshi
1e48310bcb Merge branch 'main' of https://github.com/sumeetpardeshi/inspector 2025-05-14 19:01:32 -07:00
sumeetpardeshi
d40140c2e8 fixing lint error 2025-05-14 19:01:22 -07:00
Cliff Hall
faf3efc19b
Merge branch 'main' into main 2025-05-14 16:09:23 -04:00
sumeetpardeshi
e3076ae05c fixing indentation 2025-05-13 17:09:02 -07:00
Paul Carleton
5e8e78c31d
Add Auth debugger tab (#355)
* wip auth debugger

* cleanup types and validation

* more cleanup

* draft test

* wip clean up some

* rm toasts

* consolidate state management

* prettier

* hoist state up to App

* working with quick and guided

* sort out displaying debugger

* prettier

* cleanup types

* fix tests

* cleanup comment

* prettier

* fixup types in tests

* prettier

* refactor debug to avoid toasting

* callback shuffling

* linting

* types

* rm toast in test

* bump typescript sdk version to 0.11.2 for scope parameter passing

* use proper scope handling

* test scope parameter passing

* move functions and s/sseUrl/serverUrl/

* extract status message into component

* refactor progress and steps into components

* fix test

* rename quick handler

* one less click

* last step complete

* add state machine

* test and types
2025-05-13 19:37:09 +01:00
sumeetpardeshi
283371c313 Merge branch 'main' of https://github.com/modelcontextprotocol/inspector 2025-05-12 20:30:02 -07:00
sumeetpardeshi
5b54ce1281 adding fixes as buttons were not visible for streamable-http transport type, as per PR review comment 2025-05-12 20:17:28 -07:00
Cliff Hall
f2003b30c6
Merge branch 'main' into auto_open 2025-05-12 13:09:33 -04:00
Cliff Hall
8a8deb6d39
Merge branch 'main' into feat/yizhi 2025-05-12 12:55:04 -04:00
Cliff Hall
8597100d54
Merge branch 'main' into auto_open 2025-05-12 12:45:26 -04:00
Ola Hungerford
89d721e56d
Merge pull request #333 from kentcdodds/patch-1
feat(client): add search param configuration
2025-05-10 21:30:49 -07:00
Marco
0c15c54b99
Merge branch 'main' into feat/yizhi 2025-05-09 13:12:57 +08:00
KAWAKAMI Moeki
a60764e649 Merge branch 'main' into auto_open 2025-05-09 10:58:11 +09:00
sumeetpardeshi
1067f4d22f handling duplication in catch block as per PR comments 2025-05-08 17:01:18 -07:00
Cliff Hall
b09d0e1eb6
Merge branch 'main' into patch-1 2025-05-08 16:33:11 -04:00
Cliff Hall
6223839251
Merge branch 'main' into bump-to-version-0-12-0 2025-05-08 16:00:17 -04:00
Cliff Hall
f5739971bb
Merge branch 'main' into auto_open 2025-05-08 13:08:42 -04:00
Cliff Hall
fe9ab40994
Merge branch 'main' into main 2025-05-08 12:39:48 -04:00
MMMarcinho
8373795804 feat: change style 2025-05-08 23:15:00 +08:00
KAWAKAMI Moeki
3473c8156d
Merge branch 'main' into auto_open 2025-05-08 12:56:02 +09:00
Kent C. Dodds
2915cccd85 feat(client): make all config initialize-able via search params 2025-05-07 13:26:17 -06:00
Kent C. Dodds
3c5c38462b feat(client): initialize via search params 2025-05-07 13:26:17 -06:00
Ola Hungerford
f7b936e102 Bump version to 0.12.0 2025-05-07 05:28:24 -07:00
Ola Hungerford
3e41520688
Merge pull request #371 from kentcdodds/patch-2
feat(client): Add PingTab when no server capabilities
2025-05-06 21:04:47 -07:00
sumeetpardeshi
2b963ce1ce fixing test cases after main merged 2025-05-06 17:06:54 -07:00
sumeetpardeshi
549a4ec65a fixing consolidating hook after merging with main 2025-05-06 16:39:54 -07:00
sumeetpardeshi
fef37483ba Merge branch 'main' of https://github.com/modelcontextprotocol/inspector 2025-05-06 16:35:24 -07:00
Santthosh
a57e707a0b
Merge branch 'main' into main 2025-05-06 09:51:45 -07:00
sumeetpardeshi
be7fa9baf9 changes:
- change button names
- adding unit test cases
- updated landing page image
- updating README file
as discussed here: https://github.com/modelcontextprotocol/inspector/pull/334#issuecomment-2852394054
2025-05-05 17:32:06 -07:00
kavinkumarbaskar
b00b271d65 fix: upgrade package json in cli, client, and server 2025-05-06 00:16:06 +05:30