Skip to main content
Glama

editar_cliente

Update client details such as name, CPF, and additional info by providing the client ID. Modify existing client records in the database.

Instructions

Edita os dados básicos de um cliente já existente pelo ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_clienteYes
nomeNo
cpfNo
infoNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:20-24 (handler)
    The tool handler for 'editar_cliente'. It accepts id_cliente (int), and optional nome, cpf, info parameters. Filters out None values and delegates to database.atualizar_registro.
    @mcp.tool()
    def editar_cliente(id_cliente: int, nome: str = None, cpf: str = None, info: str = None) -> str:
        """Edita os dados básicos de um cliente já existente pelo ID."""
        dados = {k: v for k, v in {"nome": nome, "cpf": cpf, "info": info}.items() if v is not None}
        return database.atualizar_registro("clientes", id_cliente, **dados)
  • server.py:20-20 (registration)
    The @mcp.tool() decorator registers 'editar_cliente' as an MCP tool on the FastMCP server instance.
    @mcp.tool()
  • The helper function 'atualizar_registro' that performs the actual SQL UPDATE operation on the database. Called by the editar_cliente handler.
    def atualizar_registro(tabela, registro_id, **kwargs):
        conn = sqlite3.connect(DB_NAME)
        cursor = conn.cursor()
        
        set_clause = ', '.join([f"{k} = ?" for k in kwargs.keys()])
        sql = f"UPDATE {tabela} SET {set_clause} WHERE id = ?"
        cursor.execute(sql, list(kwargs.values()) + [registro_id])
        conn.commit()
        conn.close()
        return f" {tabela.capitalize()} ID {registro_id} atualizado!"
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states the edit action and ID requirement, but omits side effects, idempotency, error behavior, or permission needs. Minimal transparency.

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

Conciseness3/5

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

The single sentence is concise but lacks necessary details for usage and behavior. It earns its place for purpose but not for other dimensions, so it is acceptable but not optimal.

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 has 4 parameters, required ID, and an output schema, the description does not cover return values, error cases, or whether partial updates are supported. Incomplete for safe invocation.

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?

Schema coverage is 0% and the description adds no parameter meaning beyond what the schema titles imply (e.g., 'Nome', 'Cpf'). It fails to explain the role of 'info' or that only the provided fields are updated.

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

Purpose4/5

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

The description clearly states the verb 'Edits' and the resource 'basic data of an existing client by ID', distinguishing it from creation and removal tools. However, it does not elaborate on what constitutes 'basic data', leaving some ambiguity.

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 is provided on when to use this tool versus alternatives like address update tools, nor any prerequisites or conditions. The agent must infer usage from the tool name and the sibling list.

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/mateus-gondev/MCP-PIE'

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