Skip to navigation

Reference

Tools, limits, errors, and the same simulated calls over REST.
View as Markdown

Experimental, in beta. Raya’s MCP server is new and may change. For feedback, suggestions or problems, email support@litwizlabs.ai.

Server

Endpointhttps://mcp-beta.getraya.app/mcp
TransportMCP over streamable HTTP (JSON responses)
AuthenticationAn MCP key (raya_mcp_...) in the X-API-Key header. Regular API keys are refused.
DataYour team’s agents and calls only

Tools

ToolDoes
list_agentsYour agents, most recently updated first. Filter by name.
get_agentOne agent’s full configuration: the complete prompt with its welcome and instructions blocks, prompt size and limit, output prompt, tools (header values hidden), arguments, LLM option, languages, and knowledge base files with their sizes
get_kb_fileOne knowledge base file, as the agent reads it during a call
list_llm_optionsLLM options available to your team, with simulation price in credits per 1M tokens and the prompt size limit
platform_faqRaya’s answers to common questions: ending calls, languages, call data, batches and callbacks, inbound numbers, models, plans and prices
list_callsReal calls, newest first. Filter by agent, outcome and date.
get_callA real call’s transcript, arguments, output and timing
estimate_costThe credits a planned set of simulations will cost, and how much would come from simulation credits. Nothing is run or charged.
start_sessionStart a simulated call and get the agent’s opening line
send_turnSend the caller’s next line, a silence, or answers to tool calls
end_sessionEnd the simulated call with a verdict. Returns the credits charged, how they were paid and what’s left.
get_sessionA simulated call’s transcript, verdict and credits
list_sessionsYour open simulated calls

Prompt size limit

Each LLM option has a prompt size limit, 8,000 tokens unless agreed otherwise. It applies to the agent’s whole prompt. get_agent shows prompt_tokens and prompt_token_limit. A draft over the limit is refused with PROMPT_TOO_LONG before anything is charged. An agent whose live prompt is already over the limit can still be simulated, but a tested change has to bring it under.

Limits

LimitValue
Requests10 per second per key
Simulation model requestsPer team and overall, per minute and in flight. Over the limit: 429 with Retry-After
Open simulated calls per team20
Idle timeout2 hours, then the simulated call ends and is charged
TurnsOne at a time per simulated call; a turn can take up to about a minute
Caller line / tool result / draft overrides2 KB / 32 KB / 256 KB
MCP keys per team10 active

Errors

Over MCP, errors come back as a tool result with isError: true and this body.

StatuscodeMeaning
400INVALID_INPUTA tool argument is missing or invalid; the message says which
401UNAUTHORIZEDMissing, invalid or revoked MCP key, or a regular API key used instead
402INSUFFICIENT_CREDITSYour credits are over; email support@litwizlabs.ai to recharge
402TEAM_SUSPENDEDSimulations are restricted on this account; email support@litwizlabs.ai
403HARNESS_ACCESS_DISABLEDAI assistant access is turned off for your team
404AGENT_NOT_FOUND / SESSION_NOT_FOUNDNot found, or not your team’s
409TURN_IN_PROGRESS / TOOLS_PENDING / SESSION_ENDEDOne turn at a time; answer pending tool calls first; the simulated call is over
413OVERRIDES_TOO_LARGEThe draft overrides are over 256 KB
422PROMPT_TOO_LONGThe draft is over the prompt size limit; the body has prompt_tokens and prompt_token_limit
422UNSUPPORTED_LLM / LLM_NOT_ALLOWEDThis LLM option can’t be simulated, or isn’t available to your team; try overrides.llm_option_id
429RATE_LIMITEDOver a limit; retry after Retry-After seconds
502MODEL_UNAVAILABLETemporary model issue; retry

Simulated calls over REST

The same operations are plain HTTP endpoints under https://mcp-beta.getraya.app/api/sim, with your MCP key in X-API-Key.

EndpointDoes
POST /api/sim/estimateEstimate a plan: agent_id, scenarios: [{ name, turns, runs }], optional overrides
POST /api/sim/sessionsStart: agent_id, optional call_type, agent_args, call_time (ISO 8601 with offset), timezone, initializer_values, overrides (welcome, instructions, tools, llm_option_id), labels (run_label, scenario, replay_of_call)
POST /api/sim/sessions/:id/turnExactly one of caller_text, event (silence / unclear) or tool_results ([{ tool_call_id, mode: "mock" | "live", result }])
POST /api/sim/sessions/:id/endOptional result (pass / fail) and reason. Returns credits_charged; ending twice charges once.
GET /api/sim/sessions/:idTranscript, labels, verdict and credits, readable for 3 hours after the last turn
GET /api/sim/sessionsYour open simulated calls
curl -X POST https://mcp-beta.getraya.app/api/sim/sessions \
-H "X-API-Key: <YOUR_MCP_KEY>" -H "Content-Type: application/json" \
-d '{ "agent_id": "123e4567-e89b-12d3-a456-426614174000", "labels": { "run_label": "intro fix v2" } }'

Every response carries credits_so_far. The response that ends a simulated call carries credits_charged, charged_from (how much came from simulation_credits and from balance) and credits_left (what remains of each); GET /api/sim/sessions/:id also returns credits_left. POST /api/sim/estimate also returns simulation_credits_available and estimate_paid_from.