magicblock_requestRandomness
Request provably fair on-chain randomness from the MagicBlock VRF oracle (Vrf1RNUjXmQGjmQrQLvJHs9SNkvDJEsRVFPkfSQUwGz). Builds an unsigned transaction that invokes request_randomness on the VRF program. Use sap_preview_transaction, sap_sign_transaction, and sap_submit_signed_transaction; do not c...
This record as markdown: /tools/oobe-protocol-labs-sap-mcp-server/magicblock-requestrandomness.md
What magicblock_requestRandomness does on Sap
AI agents invoke magicblock_requestRandomness to trigger actions in Sap. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
payer | string | Yes | Wallet pubkey that will pay for the request and sign the transaction |
endpoint | string | — | MagicBlock Router endpoint: 'mainnet' or 'devnet' |
ephemeral | boolean | — | Use the Ephemeral Rollup oracle queue instead of the base-layer queue (default false) |
callerSeed | string | Yes | Seed string for the VRF request — committed before randomness is produced. The seed is hashed to 32 bytes. |
callbackAccounts | array | Yes | Accounts to pass to the callback instruction |
callbackProgramId | string | Yes | Program ID of the callback program (the program that will consume the randomness) |
callbackDiscriminator | string | Yes | Base58 or hex discriminator for the callback instruction in your program |
Parameters from the server's own tool schema.
Why magicblock_requestRandomness is rated High
Executes on-chain operations with financial implications via blockchain transaction submission.
From the tool's definition invokes request_randomness on VRF program, builds unsigned transaction, builder fee applies
Risk signalsAccepts URL/endpoint input (endpoint) · High parameter count (10 properties)
Attacks that exploit this kind of access
The rule that runs magicblock_requestRandomness safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Sap, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For magicblock_requestRandomness, this is the rule to start with:
magicblock_requestRandomness stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Sap, apply this rule, and every magicblock_requestRandomness call is checked against it from then on.
Questions about magicblock_requestRandomness
Request provably fair on-chain randomness from the MagicBlock VRF oracle (Vrf1RNUjXmQGjmQrQLvJHs9SNkvDJEsRVFPkfSQUwGz). Builds an unsigned transaction that invokes request_randomness on the VRF program. Use sap_preview_transaction, sap_sign_transaction, and sap_submit_signed_transaction; do not create local signing scripts. The oracle queue defaults to the base-layer queue (Cuj97ggrhhidhbu39TijNVqE74xvKJ69gDervRUXAxGh); set ephemeral=true to use the ER queue for delegated programs. Builder fee applies. SAP MCP execution guidance: Intent: SAP MCP tool workflow. Pricing: paid builder; estimate first, then pay/build and finalize unsigned transactions locally when returned. Routing: paid hosted call; call sap_estimate_tool_cost first, then use sap_payments_call_paid_tool if the runtime cannot handle x402 natively. Signer boundary: hosted reads/builders never receive keypair bytes; value-moving results must be finalized locally when signing is required. It is categorised as a Execute tool in the Sap MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
magicblock_requestRandomness accepts 7 parameters: payer, endpoint, ephemeral, callerSeed, callbackAccounts, callbackProgramId, callbackDiscriminator. Required: payer, callerSeed, callbackAccounts, callbackProgramId, callbackDiscriminator. The full parameter table on this page comes from the server's own tool schema.
Register the Sap MCP server in PolicyLayer and add a rule for magicblock_requestRandomness: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Sap. Nothing to install.
magicblock_requestRandomness is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the magicblock_requestRandomness rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for magicblock_requestRandomness. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
magicblock_requestRandomness is provided by the Sap MCP server (https://mcp.sap.oobeprotocol.ai/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Sap, and thousands of servers like it.
This server
Across the catalogue