Skip to main content
Glama
parseen254

daraja-mcp

by parseen254

stk_push_and_wait

Send an M-Pesa payment prompt and wait for the customer to accept or decline. Returns the settled outcome with receipt number on success to confirm payment completion.

Instructions

Send an M-Pesa payment prompt and wait for the customer to accept or decline. Returns the settled outcome including the receipt number on success. Use this when you need to know whether the payment actually completed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount in KES. Whole numbers only.
shortCodeNoOverrides DARAJA_SHORTCODE.
callbackUrlNoOverrides the built-in receiver URL.
phoneNumberYesCustomer phone number. Accepts 07..., +2547..., or 2547... and is normalised.
timeoutSecondsNoHow long to wait for the customer. Prompts expire after about 60 seconds.
transactionDescNoShort description. Max 13 characters.
transactionTypeNoPayBill or Buy Goods. Must match the shortcode type.CustomerPayBillOnline
accountReferenceNoAccount identifier shown on the customer statement. Max 12 characters.
Behavior4/5

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

With no annotations, the description carries the burden. It discloses blocking behavior (wait for customer), and that it returns a settled outcome with receipt number. It doesn't mention timeout or failure modes, but the schema covers timeout details.

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 three concise sentences, front-loaded with the action and outcome, with no fluff or redundancy.

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?

For a tool with 8 parameters and no output schema, the description covers core behavior, return value, and when to use it. It could mention timeout or related tools, but the schema ably covers parameter details.

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 covers 100% of parameters with rich descriptions, so baseline 3 applies. The description itself does not add parameter-level detail, but it isn't needed given full schema coverage.

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 it sends an M-Pesa payment prompt and waits for accept/decline, returning the settled outcome. This distinguishes it from siblings like stk_push (which likely only sends) and stk_query (which queries status).

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 explicitly says 'Use this when you need to know whether the payment actually completed,' giving a clear use case. It doesn't name alternative tools but implies a contrast with non-waiting push tools.

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