Skip to main content
Glama

cantrip_meter_history

View recent credit transactions including usage debits and purchases to track running balance. Override project settings for cloud-hosted or multi-project environments.

Instructions

View recent credit transactions. Shows usage debits, purchases, and running balance. Pass project to override .cantrip.json — useful in cloud-hosted or multi-project contexts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum entries to return (default: 20)
projectNoProject slug — overrides .cantrip.json. Required in environments where cantrip_connect cannot write to the filesystem.

Implementation Reference

  • The handler function executes the tool logic by resolving the project and calling client.post with 'meter history' command, passing the limit parameter
    handler: async (p) => {
      const project = resolveProject(p.project as string | undefined);
      return client.post("meter", ["history"], { ...buildFlags({ limit: p.limit }), project });
    },
  • Input schema defining optional 'limit' parameter for max entries (default 20) and optional 'project' parameter for project slug override
    shape: {
      limit: z.number().optional().describe("Maximum entries to return (default: 20)"),
      project: projectSchema,
    },
  • src/tools.ts:428-441 (registration)
    Complete tool definition registration including name, description, input schema, and handler function for viewing credit transaction history
    {
      name: "cantrip_meter_history",
      description:
        "View recent credit transactions. Shows usage debits, purchases, and running balance." +
        PROJECT_DESC_SUFFIX,
      shape: {
        limit: z.number().optional().describe("Maximum entries to return (default: 20)"),
        project: projectSchema,
      },
      handler: async (p) => {
        const project = resolveProject(p.project as string | undefined);
        return client.post("meter", ["history"], { ...buildFlags({ limit: p.limit }), project });
      },
    },

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/ozten/mcp-server-cantrip'

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