Skip to main content
Glama
IndigoProtocol

IndigoProtocol/indigo-mcp

Official

adjust_rob

Modify ADA amounts in an ROB position on Cardano by increasing or decreasing collateral, with optional price limit updates, and generate unsigned transactions for signing.

Instructions

Adjust ADA amount in an ROB position (positive to increase, negative to decrease). Optionally update the max price. Returns an unsigned transaction (CBOR hex) for client-side signing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesUser Cardano bech32 address
robTxHashYesTransaction hash of the ROB UTxO
robOutputIndexYesOutput index of the ROB UTxO
lovelacesAdjustAmountYesLovelace adjustment amount (positive to add, negative to remove)
newMaxPriceNoOptional new max price as an on-chain integer string

Implementation Reference

  • The async handler function for the adjust_rob tool, which builds the unsigned transaction by calling adjustLrp.
    async ({ address, robTxHash, robOutputIndex, lovelacesAdjustAmount, newMaxPrice }) => {
      try {
        const result = await buildUnsignedTx(
          address,
          async (lucid) => {
            const params = await getSystemParams();
            const robOutRef = { txHash: robTxHash, outputIndex: robOutputIndex };
            const newMaxPriceDecimal =
              newMaxPrice !== undefined ? parseMaxPrice(newMaxPrice) : undefined;
            return adjustLrp(
              lucid,
              robOutRef,
              BigInt(lovelacesAdjustAmount),
              newMaxPriceDecimal,
              params
            );
          },
  • Zod schema definition for the adjust_rob tool input parameters.
    {
      address: z.string().describe('User Cardano bech32 address'),
      robTxHash: z.string().describe('Transaction hash of the ROB UTxO'),
      robOutputIndex: z.number().describe('Output index of the ROB UTxO'),
      lovelacesAdjustAmount: z
        .string()
        .describe('Lovelace adjustment amount (positive to add, negative to remove)'),
      newMaxPrice: z
        .string()
        .optional()
        .describe('Optional new max price as an on-chain integer string'),
    },
  • Tool registration for adjust_rob within the server instance.
    server.tool(
      'adjust_rob',
      'Adjust ADA amount in an ROB position (positive to increase, negative to decrease). Optionally update the max price. Returns an unsigned transaction (CBOR hex) for client-side signing.',
      {
        address: z.string().describe('User Cardano bech32 address'),
        robTxHash: z.string().describe('Transaction hash of the ROB UTxO'),
        robOutputIndex: z.number().describe('Output index of the ROB UTxO'),
        lovelacesAdjustAmount: z
          .string()
          .describe('Lovelace adjustment amount (positive to add, negative to remove)'),
        newMaxPrice: z
          .string()
          .optional()
          .describe('Optional new max price as an on-chain integer string'),
      },
      async ({ address, robTxHash, robOutputIndex, lovelacesAdjustAmount, newMaxPrice }) => {
        try {
          const result = await buildUnsignedTx(
            address,
            async (lucid) => {
              const params = await getSystemParams();
              const robOutRef = { txHash: robTxHash, outputIndex: robOutputIndex };
              const newMaxPriceDecimal =
                newMaxPrice !== undefined ? parseMaxPrice(newMaxPrice) : undefined;
              return adjustLrp(
                lucid,
                robOutRef,
                BigInt(lovelacesAdjustAmount),
                newMaxPriceDecimal,
                params
              );
            },
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully discloses the critical behavioral trait that this returns 'an unsigned transaction (CBOR hex) for client-side signing,' indicating it is a transaction builder requiring external signing rather than immediate execution. It does not mention idempotency, reversibility, or specific auth requirements beyond the signing implication.

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

Conciseness5/5

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

The description consists of two highly efficient sentences. The first front-loads the core action with parenthetical mechanics, while the second clearly states the return format. There is no redundant information; every clause provides necessary context for tool selection or invocation.

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

Completeness4/5

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

Given the absence of annotations and output schema, the description adequately compensates by specifying the return value format (unsigned CBOR hex transaction). With 100% schema coverage and clear parameter semantics covered in the description, it provides sufficient context for an agent to invoke the tool, though prerequisites (e.g., requiring an existing ROB position) are not explicitly stated.

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?

While the schema has 100% coverage (baseline 3), the description adds valuable semantic context beyond the schema: it explains the business logic for lovelacesAdjustAmount (increase vs decrease), clarifies that newMaxPrice is optional ('Optionally update'), and frames robTxHash/robOutputIndex as identifying the 'ROB position' rather than just raw UTXO coordinates.

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 clearly states the specific action ('Adjust ADA amount'), the resource ('ROB position'), and distinguishes from siblings like adjust_sp_account and adjust_staking_position by specifying the ROB context. It includes the directional mechanics (positive/negative) in the same sentence.

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

Usage Guidelines3/5

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

The description provides implicit usage guidance for the lovelacesAdjustAmount parameter ('positive to increase, negative to decrease') and notes the optionality of the max price update. However, it lacks explicit comparison with sibling ROB tools (cancel_rob, redeem_rob, claim_rob) to clarify when to adjust versus close or redeem a position.

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/IndigoProtocol/indigo-mcp'

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