Skip to main content
Glama
paracetamol951

caisse-enregistreuse-mcp-server

Retourne la liste des clients enregistrés dans la boutique, incluant leurs informations de contact, points de fidélité...

data_list_clients
Read-only

Retrieve and display client information from the sales recorder system in JSON, CSV, or HTML format for management and reporting purposes.

Instructions

Liste des Lister les clients

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNojson

Implementation Reference

  • Handler function executed for the data_list_clients tool. It resolves authentication, makes an HTTP GET request to the PHP endpoint '/workers/getClients.php' with shop ID, API key, and format parameter, logs the result, structures the data for MCP response, and handles errors gracefully.
    async ({ format }: CommonArgs, ctx: Ctx) => {
        try {
            const { shopId, apiKey } = resolveAuth(undefined, ctx);
            const data = await get(path, { idboutique: shopId, key: apiKey, format });
    
            process.stderr.write(
                `[caisse][tool:${toolName}] ok type=${Array.isArray(data) ? 'array' : typeof data}`
                + (Array.isArray(data) ? ` len=${data.length}` : '')
                + '\n'
            );
            //Array.isArray(data) ? data.slice(0, 50) : data
            const funcResult = structData( data);
            process.stderr.write(`[caisse][RES]  ${JSON.stringify(data)} \n`);
            process.stderr.write(`[caisse][RES] funcResult ${JSON.stringify(funcResult)} \n`);
            return funcResult;
            //return { content, structuredContent: isText ? undefined : data };
        } catch (e) {
            process.stderr.write(`[caisse][tool:${toolName}][error]\n`);
            process.stderr.write(`[caisse][tool:${toolName}][error] ${(e as Error).message}\n`);
            // renvoyer un message "propre" plutôt que laisser l’exception devenir un 424
            return {
                content: [{ type: 'text', text: `Erreur pendant la préparation de la réponse: ${(e as Error).message}` }],
                is_error: true,
            };
        }
  • Input schema for the data_list_clients tool, defining the optional 'format' parameter with possible values 'json', 'csv', or 'html' (defaults to 'json').
    const CommonShape = {
        format: z.enum(['json', 'csv', 'html']).default('json'),
    } satisfies Record<string, ZodTypeAny>;
  • Registers the 'data_list_clients' tool using the registerSimple helper, specifying the backend PHP endpoint and localized title/description.
    registerSimple(server, 'data_list_clients', '/workers/getClients.php', t('tools.data_list_clients.description'), t('tools.data_list_clients.title'));
  • Utility function to format large data responses for MCP tools, creating a text preview and structuredContent to avoid truncation issues.
    function structData(data: any) {
        // on ne touche PAS à structuredContent (c’est ce que ChatGPT utilise)
        const light = Array.isArray(data)
            ? data.slice(0, 5000)//.map(({ id, nom, email, tel, ...r }) => ({ id, nom, email, tel }))
            : data;
    
        const maxLength = 40000;
        const preview =
            typeof light === 'string'
                ? (light.length > maxLength ? light.slice(0, maxLength) + '…(truncated)' : light)
                : safeStringify(light, 2, maxLength);   // <-- aperçu court et “safe”
        const wrapped =
            Array.isArray(data)
                ? { data: data }
                : data && typeof data === 'object'
                    ? data
                    : { data: data };
        return {
            content: [{ type: 'text', text: preview }],
            structuredContent: wrapped,
        };
    }
  • src/index.ts:62-62 (registration)
    Invocation of registerDataTools on the main MCP server instance, which includes registration of data_list_clients among other data list tools.
    registerDataTools(mcpServer);
Behavior3/5

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

The annotations already declare readOnlyHint=true, indicating this is a safe read operation. The description adds no behavioral context beyond what annotations provide—no information about rate limits, authentication needs, pagination, or what happens when the tool is invoked. However, it doesn't contradict the annotations, so it meets the lower bar with annotations present.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While the description is extremely brief ('Liste des Lister les clients'), this brevity stems from under-specification rather than efficient communication. The phrase is redundant and poorly structured, failing to convey useful information in its limited space.

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?

Given the tool's simplicity (one optional parameter, read-only operation), the description is incomplete. It lacks context about what 'clients' means in this system, how results are returned, or any limitations. With no output schema and minimal description, it leaves significant gaps for the agent to understand the tool's full behavior.

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?

With 0% schema description coverage for the single parameter 'format', the description provides no additional parameter information. However, the schema itself fully defines the parameter with an enum (json, csv, html) and default value, giving adequate documentation. The baseline score of 3 reflects that the schema carries the documentation burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Liste des Lister les clients' is essentially a tautology that restates the tool name 'data_list_clients' in French, adding no meaningful clarification. While the title provides some context about returning client lists with contact information and loyalty points, the description itself fails to articulate what the tool actually does beyond repeating its name.

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

Usage Guidelines1/5

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

The description provides absolutely no guidance on when to use this tool versus the many sibling tools available (e.g., data_list_orders, data_list_products, order_detail, sale_create). There's no mention of appropriate contexts, prerequisites, or alternatives, leaving the agent with no usage direction.

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/paracetamol951/caisse-enregistreuse-mcp-server'

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