Invoke chaincode (submit, writes state)
invoke_chaincodeSubmit a chaincode transaction to change ledger state on a Fabric channel, returning the transaction ID and commit status. Verify with get_transaction before retrying after a commit-status timeout.
Instructions
Submit a chaincode transaction that changes state. Returns transaction ID and commit status. Use only when a state change is intended. A commit-status timeout does NOT mean the transaction failed — it may still commit; check get_transaction before retrying.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"channel": "<channel>",
"chaincode": "<chaincode>",
"method": "<method>"
},
"name": "invoke_chaincode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | String args; JSON-encode objects | |
| method | Yes | Chaincode function, e.g. GetAsset | |
| channel | Yes | Fabric channel name | |
| contract | No | Contract name within chaincode (optional) | |
| chaincode | Yes | Chaincode name | |
| transientData | No | Private data, not recorded on the ledger |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| status | No | Commit status name, e.g. VALID | |
| successful | No | ||
| blockNumber | No | ||
| deduplicated | No | ||
| transactionId | Yes |