Skip to main content
Glama
paracetamol951

caisse-enregistreuse-mcp-server

Liste toutes les déclinaisons d’articles (par exemple : taille, couleur, grammage). Retourne un tableau d’objets indiquant les valeurs et écarts de prix éventuels.

data_list_variations
Read-only

Retrieve product variations from a sales recorder system in JSON, CSV, or HTML format to manage inventory and sales data.

Instructions

Liste des Lister les déclinaisons

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNojson

Implementation Reference

  • Registration of the 'data_list_variations' tool using the generic registerSimple helper, which proxies requests to the PHP endpoint '/workers/getDeclinaisons.php'.
    registerSimple(server, 'data_list_variations', '/workers/getDeclinaisons.php', t('tools.data_list_variations.description'), t('tools.data_list_variations.title'));
  • Input schema used for the data_list_variations tool, defining the 'format' parameter.
    const CommonShape = {
        format: z.enum(['json', 'csv', 'html']).default('json'),
    } satisfies Record<string, ZodTypeAny>;
  • Handler function executed for the data_list_variations tool. It authenticates using resolveAuth, fetches data from the PHP endpoint via HTTP GET, logs the result, structures the response using structData, and handles errors.
    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,
            };
        }
    }
  • Helper function registerSimple that registers the data_list_variations (and similar) tools with a shared schema, title/description, and generic handler logic.
    function registerSimple(
        server: McpServer | any,
        toolName: string,
        path: string,
        title: string,
        entityLabel: string
    ) {
        server.registerTool(
            toolName,
            {
                title,
                description: `Liste des ${entityLabel}`,
                inputSchema: CommonShape, // ZodRawShape,
                annotations: { readOnlyHint: true }
            },
            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,
                    };
                }
            }
        );
    }
Behavior3/5

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

The description adds no behavioral context beyond what annotations provide. Annotations indicate readOnlyHint=true, which the description does not contradict, but it also fails to disclose any additional traits like rate limits, authentication needs, or data scope. With annotations covering the safety profile, the description meets the baseline but adds no extra value.

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?

The description is overly concise to the point of being nonsensical ('Liste des Lister les déclinaisons'), which is not effective communication. It lacks structure and fails to convey useful information efficiently, making it under-specified rather than appropriately concise.

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 complexity (a list operation with price variation data) and lack of output schema, the description is incomplete. It does not explain what data is returned, how price differences are presented, or any limitations. With annotations only covering read-only status, the description fails to provide sufficient context for effective use.

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?

The description provides no information about parameters. With schema description coverage at 0%, the description does not compensate by explaining the 'format' parameter or its enum values. However, since there is only one optional parameter with a clear enum, the baseline score of 3 is appropriate as the schema handles the documentation adequately.

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 déclinaisons' is a tautology that essentially restates the tool name 'data_list_variations' in French, providing no meaningful elaboration on what the tool actually does. While the title offers more detail about listing article variations and returning price differences, the description itself fails to clarify the purpose beyond repeating the 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 no guidance on when to use this tool versus alternatives. It does not mention sibling tools like 'data_list_products' or specify contexts where this tool is appropriate, leaving the agent with no usage instructions.

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