Open
Conversation
MCP tools can now return static responses from const values in outputParameters without requiring a consumes block or call/steps. - Add third anyOf branch to McpTool schema for mock mode - Extract MockResponseBuilder shared by REST and MCP adapters - Add mock mode check in ToolHandler.handleToolCall() - Add unit, integration tests and mock-mcp.yml example
- Specification-Schema: add mock mode to McpTool (third mode) - FAQ: add Q&A for MCP mock tools with const values - Roadmap: mark MCP mock feature as completed - Guide-Use-Cases: add MCP no-adapter line item - wrap-api-as-mcp: add mock mode to core concept and constraints - design-guidelines: add MCP mock mode guidance
MappedOutputParameter uses unevaluatedProperties:false and does not allow 'name'. Add a dedicated MockOutputParameter definition with name, type, and const (all required) for mock mode tools. - Add MockOutputParameter to naftiko-schema.json - Reference it in McpTool mock anyOf branch - Document MockOutputParameter in Specification-Schema.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Closes #189
What does this PR do?
Adds mock mode to the MCP server adapter, allowing MCP tools to return static
const-valued outputs without consuming any upstream HTTP API.Schema — Adds
MockOutputParameter(name + type + const) to naftiko-schema.json, accepted when a tool declares nocallorsteps.Engine — Extracts
MockResponseBuilderfromResourceRestletto build static responses from const-valued output parameters.ToolHandlerdetects mock tools (no call/steps) and delegates toMockResponseBuilderinstead of the HTTP pipeline.Docs & wiki — Updates Specification-Schema, FAQ (new entry), Roadmap, Guide-Use-Cases (key features for all 9 use cases), design-guidelines, and wrap-api-as-mcp skill reference.
Example — Adds
mock-mcp.ymltoschemas/examples/demonstrating a standalone mock MCP capability.Tests
MockResponseBuilderTest— unit tests for static response building from const-valued output parameters (string, number, boolean, object, array, nested)MockMcpIntegrationTest— end-to-end integration test loadingmock-mcp-capability.yamlfixture and exercising the full MCP mock tool chainToolHandlerTest— extended with mock-mode detection and delegation scenariosResourceRestletTest— updated after extractingMockResponseBuilderChecklist
mainAgent Context (optional)