Skip to main content
Glama

listar_tudo

Lists all customers and products currently stored in the system.

Instructions

Lista todos os clientes e produtos cadastrados.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler function for 'listar_tudo'. It queries all clientes and produtos from the database and returns a formatted string listing them.
    def listar_tudo() -> str:
        """Lista todos os clientes e produtos cadastrados."""
        c = database.buscar_registros("clientes")
        p = database.buscar_registros("produtos")
        res = "--- CLIENTES ---\n" + "\n".join([f"{x[0]}: {x[1]} (CPF: {x[2]})" for x in c])
        res += "\n\n--- PRODUTOS ---\n" + "\n".join([f"{y[0]}: {y[1]} - R${y[2]}" for y in p])
        return res
  • server.py:115-115 (registration)
    The @mcp.tool() decorator that registers 'listar_tudo' as an MCP tool.
    @mcp.tool()
  • The database helper function 'buscar_registros' used by listar_tudo to fetch all records from a table.
    def buscar_registros(tabela, campo_filtro=None, valor_filtro=None):
        conn = sqlite3.connect(DB_NAME)
        cursor = conn.cursor()
        if campo_filtro:
            cursor.execute(f"SELECT * FROM {tabela} WHERE {campo_filtro} LIKE ?", (f"%{valor_filtro}%",))
        else:
            cursor.execute(f"SELECT * FROM {tabela}")
        rows = cursor.fetchall()
        conn.close()
        return rows
Behavior3/5

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

The description discloses the output (all clients and products) but lacks details on potential size, ordering, or performance implications. With no annotations, the description carries the burden but adds minimal behavioral context.

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?

Single sentence, front-loaded, no redundant information. Every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Sufficient given zero parameters and an output schema, but missing mention of potential large result sets or pagination, which would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so baseline 4 applies. The description does not need to add parameter meaning since the schema covers 100%.

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 explicitly states the tool lists all clients and products, using a specific verb and resource. It clearly distinguishes from sibling tools that focus on individual CRUD operations.

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

Usage Guidelines3/5

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

The description implies usage for retrieving all clients and products but provides no explicit guidance on when to use this tool versus alternatives or when not to use it.

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