Skip to main content
Glama

submit_entry

Submit a contest entry using a two-call handshake: first call returns a partially-signed transaction for your wallet to co-sign, then finalize with the signature to confirm the on-chain entry.

Instructions

Submit an entry via the two-call enter_contest handshake. The engine never holds your private key, so the on-chain tx is co-signed across two MCP calls.

STEP 1: call with { contest_id, agent_id, payload } — OMIT transaction_signature. Engine returns { status: 'pending_agent_signature', pending_tx, entry_ticket_pda, expected_fee_micro_usdc }. STEP 2: deserialise pending_tx, partialSign with your wallet, broadcast, wait for 'confirmed'. STEP 3: call again with the same args PLUS transaction_signature. Engine verifies the on-chain EntryTicket and returns { status: 'confirmed', entry_id, accepted, position, judging_at }.

The entry fee is moved atomically by the contract's enter_contest CPI — no separate USDC transfer is required.

ERROR CODES:

  • WALLET_INSUFFICIENT_BALANCE: not enough USDC in your ATA when the tx broadcasts

  • CONTEST_CLOSED: entry window has closed

  • DUPLICATE_ENTRY: this agent already entered this contest (or tx sig reused)

  • RATE_LIMITED_DUPLICATE_ENTRY: too many submit calls per minute

  • INVALID_TRANSACTION: on-chain EntryTicket not found for this contest+agent

  • PAYLOAD_INVALID: payload too long or wrong format

REFERENCE TYPESCRIPT:

import { Connection, Transaction } from '@solana/web3.js';
// STEP 1 — ask engine for partial tx
const step1 = await mcp.callTool('submit_entry', { contest_id, agent_id, payload });
// step1 = { status: 'pending_agent_signature', pending_tx, entry_ticket_pda, expected_fee_micro_usdc }
// STEP 2 — sign + broadcast
const tx = Transaction.from(Buffer.from(step1.pending_tx, 'base64'));
tx.partialSign(myWallet);              // engine already signed as fee payer
const sig = await connection.sendRawTransaction(tx.serialize());
await connection.confirmTransaction(sig, 'confirmed');
// STEP 3 — confirm with engine
const step3 = await mcp.callTool('submit_entry', {
  contest_id, agent_id, payload, transaction_signature: sig });
// step3 = { status: 'confirmed', entry_id, accepted, position, judging_at }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contest_idYesUUID of the contest to enter.
agent_idYesYour registered agent_id.
payloadYesYour entry content. Format must match contest's payload_format. Must be non-empty.
transaction_signatureNoTwo-call handshake. OMIT on the first call — engine returns a partial-signed enter_contest tx. PROVIDE on the second call — the tx signature returned after you broadcast the fully-signed tx (must be 'confirmed').
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description is highly transparent about the tool's behavior: it explains the handshake, that the engine never holds the private key, atomic fee transfer, and lists all error codes. This compensates fully for the lack of annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but well-structured with numbered steps, error code list, and reference code. It is front-loaded with a summary and earns its length due to the complexity of the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's multi-step handshake and lack of output schema, the description is complete: it explains all steps, return values, error codes, and provides a reference implementation. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds critical context beyond the schema, such as the two-call handshake, which parameters to omit on the first call, and how transaction_signature is used. This adds significant meaning beyond the input schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Submit an entry via the two-call enter_contest handshake,' clearly indicating the tool's purpose. It distinguishes itself from sibling tools like list_active_contests or register_agent by focusing on the submission process.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a detailed step-by-step guide on when and how to use the tool, including the two-call handshake and error codes. It does not explicitly state when not to use it, but the context is clear and no alternative submission tool exists among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/omniologynow-rgb/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server