Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ROHAN_RELAYER_URLYesThe URL of the Rohan relayer handshake endpoint
ROHAN_CONTRACT_ADDRESSNoMidnight Preprod Contract Address

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Rohan Protocol provides gas-free confidential commitments and Ed25519 (W3C did:key) non-repudiation on Midnight Network (Ledger v9).

CORE RULES FOR AGENTS:

  1. PRIVACY BOUNDARY: Always place sensitive parameters (budgets, prices, counterparties, PII, contract terms) inside confidentialPayload. Keep actionSummary generic and non-sensitive (e.g., "Vendor Procurement Authorization").

  2. PRIVATE KEYS: Never ask the user for private keys or pass private keys in tool arguments. Local stdio identity is managed automatically (~/.rohan/agent-identity.json or ROHAN_AGENT_PRIVATE_KEY). Do not invent an agentId when a local signer is active.

  3. IDENTITY & STATUS: To check your active did:key, network, or relayer health, read rohan://identity or call rohan_get_agent_status.

  4. AUDIT VERIFICATION: rohan_verify_commitment checks plaintext against the inner payloadDigest (RFC 8785 JCS + SHA-256, referenced in actionSummary or auditBundle.payloadDigest), NOT the outer timestamp-salted intentHash. You can also pass an entire auditBundle to verify signature and binding offline.

  5. DRY RUN: Use dryRun: true only when the user explicitly asks to preview, test, or inspect a commitment without settling on-chain. The default is false; dry runs create no transaction and no txHash.

  6. ERROR RECOVERY:

    • REPLAY_DETECTED (409): Do NOT retry the same payload/nonce. Call rohan_get_transaction_history to inspect existing settlements.

    • STALE_TIMESTAMP (401): Retry with a fresh tool invocation.

    • INVALID_SIGNATURE (401): Call rohan_get_agent_status to verify the active identity and relayer status before retrying.

    • IDENTITY_MISMATCH (403): Omit agentId so the active signer's DID is used automatically.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
rohan_execute_handshakeA

Executes or locally previews a confidential handshake commitment on Midnight. Usage guidelines:

  • Use for a user-authorized settlement; set dryRun: true only when the user asks to preview, test, or inspect a commitment without on-chain settlement (default false).

  • Do not use for reads, history, status, or audit; use rohan_get_ledger_state, rohan_get_transaction_history, rohan_get_agent_status, or rohan_verify_commitment instead.

  • Keep sensitive values in confidentialPayload, actionSummary generic, and private keys out of tool arguments. Follow recoveryAction on errors; after replay check transaction history, and after signature errors check agent status. Payloads are canonicalized and hashed locally.

rohan_get_ledger_stateA

Reads the current anchored Rohan Protocol contract state on Midnight. Usage guidelines:

  • Use for the latest state root, block height, or last transaction hash; do not use for transaction lists (use rohan_get_transaction_history) or identity/relayer health (use rohan_get_agent_status).

  • This is a read-only network lookup; do not include confidential payloads. If unavailable, check rohan_get_agent_status before retrying.

rohan_get_transaction_historyA

Lists historical Rohan Protocol settlement transactions and receipts on Midnight. Usage guidelines:

  • Use to find or inspect prior settlements, especially after REPLAY_DETECTED; do not use for the latest state root (use rohan_get_ledger_state) or identity/health (use rohan_get_agent_status).

  • This read-only lookup accepts no confidential payload. If it fails, check rohan_get_agent_status and follow the returned error guidance.

rohan_verify_commitmentA

Cryptographically audits a plaintext payload and/or a portable RohanAuditBundle offline in local memory (0 gas). Usage guidelines:

  • Use to verify a payload digest or audit bundle; do not use to submit a handshake (use rohan_execute_handshake).

  • For expectedDigest mode provide the exact original JSON payload and the inner payloadDigest; never pass the outer timestamp-salted intentHash. For auditBundle mode, provide the complete bundle and optionally the original payload.

  • Verification is local and does not send plaintext to the relayer. Treat valid: false as a cryptographic mismatch, not a tool execution error; use recoveryAction to correct inputs.

rohan_get_agent_statusA

Returns the active Sovereign Agent identity (W3C did:key), signing mode, configured network, and relayer reachability (gracefully degrades if offline). Usage guidelines:

  • Use to inspect local identity or diagnose connectivity and signature errors; do not use for transaction details (use rohan_get_transaction_history) or full ledger state (use rohan_get_ledger_state).

  • Never exposes private keys. Do not send secrets as arguments; if offline, inspect configuration and retry only after recovery.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
Rohan Sovereign Agent IdentityRead-only metadata describing the active Ed25519 W3C did:key identity, signing mode, keystore path, and Midnight contract context.

TDQS

A4.6/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct role: execute settlement, read ledger state, list transaction history, inspect agent identity/health, and verify commitments offline. The descriptions explicitly cross-reference the other tools to redirect common misuses, leaving little overlap.

Naming Consistency5/5

All tools use a consistent rohan_ prefix followed by a snake_case verb_noun pattern (execute_handshake, get_ledger_state, get_transaction_history, get_agent_status, verify_commitment). The convention is predictable throughout.

Tool Count5/5

Five tools is well-scoped for this domain: one write operation, three reads/diagnostics, and one offline verification tool. Each tool earns its place without obvious redundancy.

Completeness4/5

The surface covers the core settlement lifecycle: execution, state read, history, identity/health, and cryptographic verification. Minor gaps exist, such as querying a specific commitment by ID or cancelling a pending settlement, but agents can work around them via history and state reads.

Maintenance

ActivityActive
ResponsivenessNo recent community issues