mockToolWithMeta creates a ServerTool with Meta for testing insiders mode
(name string, toolsetID string, meta map[string]any)
| 1806 | |
| 1807 | // mockToolWithMeta creates a ServerTool with Meta for testing insiders mode |
| 1808 | func mockToolWithMeta(name string, toolsetID string, meta map[string]any) ServerTool { |
| 1809 | return NewServerTool( |
| 1810 | mcp.Tool{ |
| 1811 | Name: name, |
| 1812 | Annotations: &mcp.ToolAnnotations{ |
| 1813 | ReadOnlyHint: true, |
| 1814 | }, |
| 1815 | InputSchema: json.RawMessage(`{"type":"object","properties":{}}`), |
| 1816 | Meta: meta, |
| 1817 | }, |
| 1818 | testToolsetMetadata(toolsetID), |
| 1819 | func(_ context.Context, _ *mcp.CallToolRequest) (*mcp.CallToolResult, error) { |
| 1820 | return nil, nil |
| 1821 | }, |
| 1822 | ) |
| 1823 | } |
| 1824 | |
| 1825 | func TestWithMCPApps_DisabledStripsUIMetadata(t *testing.T) { |
| 1826 | toolWithUI := mockToolWithMeta("tool_with_ui", "toolset1", map[string]any{ |
no test coverage detected