Read MCP results without mistaking transport success for tool success
Separate HTTP, JSON-RPC and operational failures, then report only the result the server established.
Use the concrete schema to reject unknown fields, missing identities and ambiguous provider versions before execution.
Lupin tools/list returns each tool’s concrete inputSchema along with its name, description and annotations. Use that schema to shape the client form and validate the proposed argument object. Do not infer argument names from a natural-language description or a previous SDK method signature. A strict catalog keeps the model from choosing arbitrary HTTP methods or URLs, while schema validation catches a different class of errors: missing IDs, invalid ranges, unsupported enum values and unknown properties. Neither layer replaces the server’s later ownership and permission checks.
An integer limit should remain an integer, an address list should remain an array and a nested arguments object should remain structured data. Avoid a generic helper that turns every field into a string because that can make a plausible-looking call fail or change meaning. Use required fields from the discovered schema and distinguish an omitted optional property from an explicit null. Lupin’s shared catalog uses strict object schemas and MCP discovery exposes additionalProperties false. Extra convenience fields are not silently accepted merely because the model thinks they are explanatory metadata.
Connected-app discovery adds a concrete tool version, tool_slug, connection_id, connection_revision and exact argument schema. Preserve that combination in the proposal. Do not substitute latest or reuse an approval after the account reconnects, because the selected account revision can change. Provider descriptions and returned text are untrusted data even when discovery itself is authenticated. A schema that allows a string does not authorize inserting credentials, arbitrary provider URLs or a different user identity into it. The execution endpoint controls those server-side details.
Lupin uses JSON-RPC -32602 for invalid tool arguments and returns a bounded description of the invalid paths. Show the fields a human or caller can correct without echoing private payloads into shared logs. Avoid a model loop that blindly modifies and resubmits an external action until validation passes; preserve the proposed action and request renewed approval when meaning changes. Refresh discovery if you have evidence that the contract changed, rather than treating every permission or provider error as a stale-schema problem.
Test a missing inbox ID, an unknown property, an out-of-range limit and a connected-tool call with an invalid concrete version. Then test a schema-valid but unauthorized call separately. Your next step is to make those distinctions visible in the client result model so a successfully validated proposal cannot be mistaken for an executed or approved action.
Reviewed against checked-in Lupin API handlers and documentation. Example requests were not executed against live providers.
Prepared with AI assistance by Lupin editorial. How we research and maintain these guides.