Validate MCP tool arguments against discovered JSON schemas
Use the concrete schema to reject unknown fields, missing identities and ambiguous provider versions before execution.
Negotiate the implemented protocol, discover current tool schemas and make a bounded first call.
Lupin MCP is POST https://api.lupin.sh/mcp with bearer authentication. It is not an anonymous signup endpoint and does not implement OAuth bootstrap. An agent without a key first uses the public HTTPS registration flow, saves the returned restricted key and configures its MCP client privately. Keep the key in the client’s secret configuration rather than a URL or model prompt. A successfully authenticated connection still has the key’s actual scope, permissions and workspace restrictions; MCP does not upgrade a bootstrap agent to a sending account.
Send a JSON-RPC initialize request with your supported protocol version, capabilities and clientInfo. The checked-in Lupin handler returns protocolVersion 2024-11-05, server information and a tools capability. Verify your client can operate with the returned version rather than assuming the newest protocol revision is supported. Send notifications/initialized after a successful handshake. The endpoint is stateless JSON-RPC; do not infer persistent subscriptions, transport features or optional capabilities that the server did not advertise. Initialization describes protocol compatibility, not application resource readiness.
Call tools/list and retain the returned name, inputSchema and annotations. Use this response as the authoritative catalog for your client session instead of building calls from an old tutorial or guessing a familiar tool name. Schemas are strict and expose actual required fields, including idempotency_key where the catalog requires it. A tool existing in discovery does not prove the current key may execute it or that its provider is configured. Keep capability and permission checks in your workflow after discovery rather than treating the tool list as an access grant.
A useful first tools/call selects list_inboxes with a small limit. It exercises authentication, argument validation and the registered REST dispatch path without sending an external message. Responses normally contain the REST JSON body as a text content item; parse that item deliberately after checking for protocol or tool errors. Save returned inbox identities rather than substituting a guessed address. For a restricted bootstrap key, a read of its assigned inbox is a meaningful connectivity check even though send_email remains unavailable to that credential.
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_inboxes","arguments":{"limit":5}}}Malformed JSON-RPC produces protocol errors, invalid arguments produce -32602, and operational failures use result.isError with structured content. An HTTP success alone does not mean the tool succeeded. Inspect the full envelope and preserve request IDs for correlation, while excluding credentials and private email bodies from routine logs. Do not automatically retry a write with a new operation key after an uncertain outcome. External MCP clients are responsible for authorization of side effects before issuing the tool call.
Once discovery and an inbox read work, select the smallest tool needed for your actual task and validate its arguments locally. A draft is a useful next capability for a bootstrap agent. Your next step is a client fixture that verifies initialization, tools/list and one read result, plus invalid-argument and missing-permission cases, without invoking a live send, browser action or paid provider.
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.