Skip to main content
Glama

List recent payments from this session

grip_list_payments
Read-onlyIdempotent

Lists recent payments from the current session, including pending, settled, rejected, and failed transactions. Helps users review their payment activity and status.

Instructions

Returns recent payments (pending, settled, rejected, failed) staged or executed in this MCP session. Read-only. Useful when the human asks 'what have I paid today' or 'what's pending'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Implementation Reference

  • Registration of the 'grip_list_payments' tool via server.registerTool(), including its schema (inputSchema) and the async handler function.
    server.registerTool(
      "grip_list_payments",
      {
        title: "List recent payments from this session",
        description:
          "Returns recent payments (pending, settled, rejected, failed) staged or executed in this MCP session. Read-only. Useful when the human asks 'what have I paid today' or 'what's pending'.",
        inputSchema: {
          limit: z.number().int().min(1).max(50).optional(),
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false,
        },
      },
      async ({ limit }) => {
        const all = [...pendingPayments.values()]
          .sort((a, b) => b.createdAt.localeCompare(a.createdAt))
          .slice(0, limit ?? 10);
        if (all.length === 0) {
          return { content: [{ type: "text", text: "No payments in this session yet." }] };
        }
        const lines = all.map((p) => {
          const icon = p.status === "settled" ? "🟢" : p.status === "rejected" ? "🔴" : p.status === "failed" ? "⚠️" : "🟡";
          const tail = p.txHash
            ? ` · tx ${p.txHash.slice(0, 10)}…${p.txHash.slice(-6)}`
            : p.status === "failed"
            ? ` · ${p.errorMessage}`
            : "";
          return `${icon} ${p.amountUsdc.toFixed(2)} USDC → ${shortAddr(p.recipient)} [${p.status}]${tail}`;
        });
        return {
          content: [{ type: "text", text: lines.join("\n") }],
          structuredContent: { payments: all },
        };
      },
    );
  • Handler function for grip_list_payments that lists payments (pending, settled, rejected, failed) from the session, sorted by createdAt, with limit support.
    async ({ limit }) => {
      const all = [...pendingPayments.values()]
        .sort((a, b) => b.createdAt.localeCompare(a.createdAt))
        .slice(0, limit ?? 10);
      if (all.length === 0) {
        return { content: [{ type: "text", text: "No payments in this session yet." }] };
      }
      const lines = all.map((p) => {
        const icon = p.status === "settled" ? "🟢" : p.status === "rejected" ? "🔴" : p.status === "failed" ? "⚠️" : "🟡";
        const tail = p.txHash
          ? ` · tx ${p.txHash.slice(0, 10)}…${p.txHash.slice(-6)}`
          : p.status === "failed"
          ? ` · ${p.errorMessage}`
          : "";
        return `${icon} ${p.amountUsdc.toFixed(2)} USDC → ${shortAddr(p.recipient)} [${p.status}]${tail}`;
      });
      return {
        content: [{ type: "text", text: lines.join("\n") }],
        structuredContent: { payments: all },
      };
    },
  • Input schema: optional 'limit' parameter (integer, 1-50).
    inputSchema: {
      limit: z.number().int().min(1).max(50).optional(),
    },
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, and idempotentHint. The description adds 'Read-only' (consistent) and specifies session-scoped payments, which is not in annotations.

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?

Two sentences: first states purpose and resource, second gives usage examples. No wasted words, front-loaded.

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

Completeness5/5

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

Given the simple tool (one optional parameter, rich annotations, no output schema), the description covers purpose, scope, and use cases adequately.

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?

The schema has 0% description coverage for the limit parameter, and the description does not mention the parameter or add meaning beyond the schema's min/max constraints.

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 the verb 'returns' and the resource 'payments', specifying they are 'staged or executed in this MCP session', which distinguishes it from sibling tools like grip_create_payment.

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 provides explicit usage guidance with examples like 'what have I paid today' or 'what's pending', but does not mention when not to use it or alternatives.

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/grip-foundation/grip-mcp'

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