Skip to main content
Glama
parseen254

daraja-mcp

by parseen254

reversal

Reverse an M-Pesa transaction paid into your shortcode by providing the receipt ID and amount to refund.

Instructions

Reverse a transaction that was paid into your shortcode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount in KES, whole numbers only.
remarksNoReversal
resultUrlNo
transactionIdYesM-Pesa receipt number of the transaction to reverse.
receiverShortCodeNoShortcode that received the money.
Behavior2/5

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

No annotations are present, so the description must carry the burden of disclosing behavioral traits. It only says 'reverse' without explaining whether the operation is irreversible, asynchronous, requires special permissions, or what errors may occur (e.g., already reversed transactions). This is minimal behavioral detail for a financial mutation tool.

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 sentence, front-loaded with the action and object, with zero filler words. It is appropriately concise for the limited content it conveys.

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

Completeness2/5

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

The tool has 5 parameters, no output schema, and no annotations, yet the description only provides a one-line summary. It omits important context such as expected callback/result behavior, reversibility limits, and whether the reversal is immediate or queued. This is incomplete for an agent to invoke the tool reliably.

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

Parameters2/5

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

Schema description coverage is 60% (amount, transactionId, receiverShortCode documented). The description itself adds no parameter-level meaning beyond saying 'your shortcode', which loosely maps to receiverShortCode. Parameters like resultUrl and remarks remain unexplained, and the description does not compensate for the coverage gap.

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 uses a specific verb ('Reverse') and resource ('a transaction that was paid into your shortcode'), clearly distinguishing this from transaction lookup tools like transaction_status. It precisely identifies the target operation and scope (inbound shortcode payments).

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 implies usage context: reversing an inbound payment to a shortcode. However, it does not explicitly state when not to use it or mention alternatives such as transaction_status for checking a transaction before reversal. The guidance is implied rather than explicit.

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/parseen254/daraja-mcp'

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