Skip to main content
Glama
lakshitha0526

PayHere MCP Server

Generate or verify a PayHere signature

generate_signature

Computes a PayHere MD5 hash for checkout submissions or validates incoming notify URL signatures, returning verification result if expected signature provided.

Instructions

Computes a PayHere MD5 hash for either checkout submission (mode='checkout') or notify URL validation (mode='notify'). For notify mode, pass expectedMd5Sig to verify an incoming signature in one shot. Uses the merchant secret from the server's environment — never include the secret in tool arguments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesWhich hash variant to compute
merchantIdNoMerchant ID. Defaults to PAYHERE_MERCHANT_ID env var.
orderIdYes
amountNoRequired for mode='checkout'. Formatted to 2dp internally.
currencyNoRequired for mode='checkout'. ISO 4217 (e.g. LKR).
payhereAmountNoRequired for mode='notify'. As sent by PayHere.
payhereCurrencyNoRequired for mode='notify'. As sent by PayHere.
statusCodeNoRequired for mode='notify'. PayHere status_code value.
expectedMd5SigNoOptional for mode='notify'. If provided, returns verification result instead of just the hash.
Behavior4/5

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

With no annotations, the description carries the full burden. It reveals that the tool uses a merchant secret from the server environment and never requires it in arguments. It describes conditional behavior for notify mode with verification. However, it does not discuss side effects or performance, but as a pure computation, this is acceptable.

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 sentences long, front-loads the core purpose, and contains no filler. Every sentence provides essential information about modes, verification, and security. It is highly efficient.

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

Completeness3/5

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

While the description covers modes and verification well, it does not specify the return type or structure. For a tool with no output schema, describing whether the output is a hash string, a boolean, or an object would be helpful for an AI agent to interpret results correctly. This omission makes it slightly incomplete.

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?

Schema description coverage is 89%, so the schema already documents most parameters. The description adds value by explaining conditional requirements (e.g., amount and currency for checkout, payhereAmount/Currency/statusCode for notify) and the role of expectedMd5Sig. This goes beyond the schema's individual descriptions.

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 that the tool computes a PayHere MD5 hash for checkout submission or notify URL validation, using specific verbs and resources. It distinguishes between two modes and a verification feature, making its purpose unambiguous and distinct from sibling tools.

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 explains when to use each mode (checkout vs notify) and how to verify incoming signatures by passing expectedMd5Sig. It also warns against including the secret in arguments. However, it does not explicitly contrast with sibling tools, though the different operations imply appropriate usage.

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/lakshitha0526/payhere-mcp'

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