Skip to main content
Glama

Tokenbooks - crypto and fiat accounting and payments

Reprocess Portfolio Transaction

reprocess_transaction
Destructive

Recalculate one accounting transaction after correcting its inputs; this destructive queued job may regroup only its assigned wallet movements, and waitForCompletion can return the final state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoOptional immutable root reason; nonempty bytes are preserved exactly
timeoutMsNoMaximum wait time in milliseconds
portfolioRefYesPortfolio name or slug
workspaceRefYesWorkspace name or slug
transactionIdYesSelected portfolio transaction ID to reprocess
pollIntervalMsNoRequest-status polling interval in milliseconds
waitForCompletionNoWait for the queued reprocess request to reach a terminal state before returning

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
statusYes
successNo
requestsNo
statusesNo
completedNo
requestIdNo
finalStateNo
transactionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "oneOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "completed": {
      +          "type": "boolean"
      +        },
      +        "finalState": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "classificationState": {
      +              "type": "string"
      +            },
      +            "errorTypes": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "hasError": {
      +              "type": "boolean"
      +            },
      +            "operationType": {
      +              "type": "string"
      +            },
      +            "suggestedAction": {}
      +          },
      +          "required": [
      +            "hasError",
      +            "errorTypes",
      +            "suggestedAction"
      +          ],
      +          "type": "object"
      +        },
      +        "requestId": {
      +          "type": "string"
      +        },
      +        "requests": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "all": {
      +              "items": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "appProgress": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "completed": {
      +                        "type": "number"
      +                      },
      +                      "total": {
      +                        "type": "number"
      +                      },
      +                      "transactionsSynced": {
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "completed",
      +                      "total",
      +                      "transactionsSynced"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "completedAt": {
      +                    "format": "date-time",
      +                    "type": "string"
      +                  },
      +                  "createdAt": {
      +                    "format": "date-time",
      +                    "type": "string"
      +                  },
      +                  "error": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "error": {
      +                        "additionalProperties": false,
      +                        "properties": {
      +                          "code": {
      +                            "type": "string"
      +                          },
      +                          "details": {
      +                            "additionalProperties": {},
      +                            "propertyNames": {
      +                              "type": "string"
      +                            },
      +                            "type": "object"
      +                          },
      +                          "message": {
      +                            "type": "string"
      +                          },
      +                          "requestId": {
      +                            "type": "string"
      +                          }
      +                        },
      +                        "required": [
      +                          "code",
      +                          "message",
      +                          "requestId"
      +                        ],
      +                        "type": "object"
      +                      }
      +                    },
      +                    "required": [
      +                      "error"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "finishedOn": {
      +                    "type": "number"
      +                  },
      +                  "progress": {
      +                    "type": "number"
      +                  },
      +                  "requestId": {
      +                    "type": "string"
      +                  },
      +                  "result": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "downloadUrl": {
      +                        "type": "string"
      +                      },
      +                      "fileSize": {
      +                        "type": "number"
      +                      },
      +                      "format": {
      +                        "enum": [
      +                          "xlsx",
      +                          "pdf",
      +                          "json"
      +                        ],
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "downloadUrl",
      +                      "fileSize",
      +                      "format"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "returnValue": {},
      +                  "status": {
      +                    "enum": [
      +                      "pending",
      +                      "active",
      +                      "delayed",
      +                      "completed",
      +                      "failed"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "type": {
      +                    "enum": [
      +                      "sync",
      +                      "export",
      +                      "recompute",
      +                      "reclassify"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "updatedAt": {
      +                    "format": "date-time",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "requestId",
      +                  "type",
      +                  "status",
      +                  "progress",
      +                  "createdAt",
      +                  "updatedAt"
      +                ],
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "primary": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "primary",
      +            "all"
      +          ],
      +          "type": "object"
      +        },
      +        "status": {
      +          "const": "queued",
      +          "type": "string"
      +        },
      +        "statuses": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "appProgress": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "completed": {
      +                    "type": "number"
      +                  },
      +                  "total": {
      +                    "type": "number"
      +                  },
      +                  "transactionsSynced": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "completed",
      +                  "total",
      +                  "transactionsSynced"
      +                ],
      +                "type": "object"
      +              },
      +              "completedAt": {
      +                "format": "date-time",
      +                "type": "string"
      +              },
      +              "createdAt": {
      +                "format": "date-time",
      +                "type": "string"
      +              },
      +              "error": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "error": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "code": {
      +                        "type": "string"
      +                      },
      +                      "details": {
      +                        "additionalProperties": {},
      +                        "propertyNames": {
      +                          "type": "string"
      +                        },
      +                        "type": "object"
      +                      },
      +                      "message": {
      +                        "type": "string"
      +                      },
      +                      "requestId": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "code",
      +                      "message",
      +                      "requestId"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "error"
      +                ],
      +                "type": "object"
      +              },
      +              "finishedOn": {
      +                "type": "number"
      +              },
      +              "progress": {
      +                "type": "number"
      +              },
      +              "requestId": {
      +                "type": "string"
      +              },
      +              "result": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "downloadUrl": {
      +                    "type": "string"
      +                  },
      +                  "fileSize": {
      +                    "type": "number"
      +                  },
      +                  "format": {
      +                    "enum": [
      +                      "xlsx",
      +                      "pdf",
      +                      "json"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "downloadUrl",
      +                  "fileSize",
      +                  "format"
      +                ],
      +                "type": "object"
      +              },
      +              "returnValue": {},
      +              "status": {
      +                "enum": [
      +                  "pending",
      +                  "active",
      +                  "delayed",
      +                  "completed",
      +                  "failed"
      +                ],
      +                "type": "string"
      +              },
      +              "type": {
      +                "enum": [
      +                  "sync",
      +                  "export",
      +                  "recompute",
      +                  "reclassify"
      +                ],
      +                "type": "string"
      +              },
      +              "updatedAt": {
      +                "format": "date-time",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "requestId",
      +              "type",
      +              "status",
      +              "progress",
      +              "createdAt",
      +              "updatedAt"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "transactionId": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "requestId",
      +        "transactionId"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "error": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "message": {
      +              "type": "string"
      +            },
      +            "name": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "message"
      +          ],
      +          "type": "object"
      +        },
      +        "status": {
      +          "const": "completed",
      +          "type": "string"
      +        },
      +        "success": {
      +          "type": "boolean"
      +        },
      +        "transactionId": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "status",
      +        "success",
      +        "transactionId"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "properties": {
      +    "completed": {
      +      "type": "boolean"
      +    },
      +    "error": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "message": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    "finalState": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "classificationState": {
      +          "type": "string"
      +        },
      +        "errorTypes": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "hasError": {
      +          "type": "boolean"
      +        },
      +        "operationType": {
      +          "type": "string"
      +        },
      +        "suggestedAction": {}
      +      },
      +      "required": [
      +        "hasError",
      +        "errorTypes",
      +        "suggestedAction"
      +      ],
      +      "type": "object"
      +    },
      +    "requestId": {
      +      "type": "string"
      +    },
      +    "requests": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "all": {
      +          "items": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "appProgress": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "completed": {
      +                    "type": "number"
      +                  },
      +                  "total": {
      +                    "type": "number"
      +                  },
      +                  "transactionsSynced": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "completed",
      +                  "total",
      +                  "transactionsSynced"
      +                ],
      +                "type": "object"
      +              },
      +              "completedAt": {
      +                "format": "date-time",
      +                "type": "string"
      +              },
      +              "createdAt": {
      +                "format": "date-time",
      +                "type": "string"
      +              },
      +              "error": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "error": {
      +                    "additionalProperties": false,
      +                    "properties": {
      +                      "code": {
      +                        "type": "string"
      +                      },
      +                      "details": {
      +                        "additionalProperties": {},
      +                        "propertyNames": {
      +                          "type": "string"
      +                        },
      +                        "type": "object"
      +                      },
      +                      "message": {
      +                        "type": "string"
      +                      },
      +                      "requestId": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "code",
      +                      "message",
      +                      "requestId"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "error"
      +                ],
      +                "type": "object"
      +              },
      +              "finishedOn": {
      +                "type": "number"
      +              },
      +              "progress": {
      +                "type": "number"
      +              },
      +              "requestId": {
      +                "type": "string"
      +              },
      +              "result": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "downloadUrl": {
      +                    "type": "string"
      +                  },
      +                  "fileSize": {
      +                    "type": "number"
      +                  },
      +                  "format": {
      +                    "enum": [
      +                      "xlsx",
      +                      "pdf",
      +                      "json"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "downloadUrl",
      +                  "fileSize",
      +                  "format"
      +                ],
      +                "type": "object"
      +              },
      +              "returnValue": {},
      +              "status": {
      +                "enum": [
      +                  "pending",
      +                  "active",
      +                  "delayed",
      +                  "completed",
      +                  "failed"
      +                ],
      +                "type": "string"
      +              },
      +              "type": {
      +                "enum": [
      +                  "sync",
      +                  "export",
      +                  "recompute",
      +                  "reclassify"
      +                ],
      +                "type": "string"
      +              },
      +              "updatedAt": {
      +                "format": "date-time",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "requestId",
      +              "type",
      +              "status",
      +              "progress",
      +              "createdAt",
      +              "updatedAt"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "primary": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "primary",
      +        "all"
      +      ],
      +      "type": "object"
      +    },
      +    "status": {
      +      "enum": [
      +        "queued",
      +        "completed"
      +      ],
      +      "type": "string"
      +    },
      +    "statuses": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "appProgress": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "completed": {
      +                "type": "number"
      +              },
      +              "total": {
      +                "type": "number"
      +              },
      +              "transactionsSynced": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "completed",
      +              "total",
      +              "transactionsSynced"
      +            ],
      +            "type": "object"
      +          },
      +          "completedAt": {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          "createdAt": {
      +            "format": "date-time",
      +            "type": "string"
      +          },
      +          "error": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "error": {
      +                "additionalProperties": false,
      +                "properties": {
      +                  "code": {
      +                    "type": "string"
      +                  },
      +                  "details": {
      +                    "additionalProperties": {},
      +                    "propertyNames": {
      +                      "type": "string"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "message": {
      +                    "type": "string"
      +                  },
      +                  "requestId": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "code",
      +                  "message",
      +                  "requestId"
      +                ],
      +                "type": "object"
      +              }
      +            },
      +            "required": [
      +              "error"
      +            ],
      +            "type": "object"
      +          },
      +          "finishedOn": {
      +            "type": "number"
      +          },
      +          "progress": {
      +            "type": "number"
      +          },
      +          "requestId": {
      +            "type": "string"
      +          },
      +          "result": {
      +            "additionalProperties": false,
      +            "properties": {
      +              "downloadUrl": {
      +                "type": "string"
      +              },
      +              "fileSize": {
      +                "type": "number"
      +              },
      +              "format": {
      +                "enum": [
      +                  "xlsx",
      +                  "pdf",
      +                  "json"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "downloadUrl",
      +              "fileSize",
      +              "format"
      +            ],
      +            "type": "object"
      +          },
      +          "returnValue": {},
      +          "status": {
      +            "enum": [
      +              "pending",
      +              "active",
      +              "delayed",
      +              "completed",
      +              "failed"
      +            ],
      +            "type": "string"
      +          },
      +          "type": {
      +            "enum": [
      +              "sync",
      +              "export",
      +              "recompute",
      +              "reclassify"
      +            ],
      +            "type": "string"
      +          },
      +          "updatedAt": {
      +            "format": "date-time",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "requestId",
      +          "type",
      +          "status",
      +          "progress",
      +          "createdAt",
      +          "updatedAt"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    },
      +    "transactionId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "transactionId"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The description adds meaningful behavioral context beyond annotations: it is a 'destructive queued job,' may 'regroup only its assigned wallet movements,' and notes that 'waitForCompletion can return the final state.' This supplements the destructiveHint and gives the agent insight into side effects and execution model.

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 is a single dense sentence with no filler. It front-loads the core purpose, then provides essential behavioral caveats about destructiveness, queued execution, and wait behavior. Every clause adds value.

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 presence of annotations and an output schema, the description covers the key nuances: queued execution, destructive nature, scope of side effects, and waitForCompletion behavior. It does not attempt to explain every parameter or return shape, which is appropriate because those are already specified structurally.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented in the input schema. The description does not need to elaborate on individual parameters, and it does not add significant parameter-specific meaning beyond the 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 begins with a specific verb and resource: 'Recalculate one accounting transaction after correcting its inputs.' This clearly distinguishes the operation from editing, merging, or splitting transactions, and the phrase 'one accounting transaction' narrows the scope.

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 phrase 'after correcting its inputs' gives clear contextual guidance on when to invoke this tool. It does not explicitly name alternative tools or state when not to use it, but the purpose is specific enough that an agent can infer appropriate usage compared to generic editing tools.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources