Skip to main content
Glama
lindoai

mcp-lindoai

Official

get_client_credits

Read-only

Retrieve the current credit balance for a specific client. Input the client ID to get their available credits.

Instructions

Get client credit balance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
client_idYesThe client ID

Implementation Reference

  • Handler function for the 'get_client_credits' tool. Calls the API endpoint /v1/ai/credits/client?client_id={client_id} via GET and returns the credit balance data.
    async ({ client_id }) => {
      const data = await apiCall(`/v1/ai/credits/client?client_id=${client_id}`, "GET");
      return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
    }
  • Input schema requiring a 'client_id' string parameter described as 'The client ID'. Uses Zod for validation via z.string().describe().
    {
      client_id: z.string().describe("The client ID"),
    },
  • Registration of the 'get_client_credits' tool on the MCP server using server.tool() with the name 'get_client_credits', description 'Get client credit balance.', title 'Get Client Credits', and readOnlyHint set to true.
    server.tool(
      "get_client_credits",
      "Get client credit balance.",
      {
        client_id: z.string().describe("The client ID"),
      },
      { title: "Get Client Credits", readOnlyHint: true, destructiveHint: false, openWorldHint: false },
      async ({ client_id }) => {
        const data = await apiCall(`/v1/ai/credits/client?client_id=${client_id}`, "GET");
        return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
      }
    );
Behavior2/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false. The description adds no additional behavioral context such as authentication requirements, rate limits, or what 'credit balance' includes. Does not contradict 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?

A single, front-loaded sentence with no wasted words. It is appropriately sized for a simple read operation.

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?

Despite no output schema, the description does not explain what data is returned (e.g., balance number, currency, or additional fields). For a tool with many siblings, more context would improve completeness.

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 coverage is 100% with a single parameter 'client_id' described as 'The client ID'. The description adds no extra meaning beyond the schema, so baseline score of 3 applies.

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 'Get client credit balance' clearly states the action (get) and resource (client credit balance), differentiating it from sibling 'get_credits' which likely returns workspace-level credits.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like 'get_credits' or 'allocate_credits'. Lacks any when-to-use or when-not-to-use context.

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

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