Skip to main content
Glama

pje_listar_processos

List judicial processes from Brazil's PJE system with optional filters, page numbers, and result sizes to organize legal case searches.

Instructions

Lista processos com filtros opcionais

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoFiltro para busca
pageNoNúmero da página
sizeNoTamanho da página

Implementation Reference

  • MCP tool handler function that destructures arguments, calls PJEClient.listarProcessos, and returns a formatted text response with the JSON result.
    private async listarProcessos(args: any) {
      const { filter, page, size } = args;
      const result = await this.pjeClient!.listarProcessos(filter, undefined, undefined, page, size);
    
      return {
        content: [
          {
            type: "text",
            text: `📋 **Processos encontrados:**\n\n${JSON.stringify(result, null, 2)}`,
          },
        ],
      };
    }
  • Core implementation in PJEClient that constructs query parameters and makes HTTP GET request to /api/v1/processos endpoint.
    async listarProcessos(filter?: any, fields?: string[], order?: any, page?: number, size?: number): Promise<PJEResponse> {
      const params: any = {};
      
      if (filter) {
        params.filter = typeof filter === "string" ? filter : JSON.stringify(filter);
      }
      if (fields) {
        params.fields = Array.isArray(fields) ? JSON.stringify(fields) : fields;
      }
      if (order) {
        params.order = typeof order === "string" ? order : JSON.stringify(order);
      }
      if (page || size) {
        params.page = JSON.stringify({ page: page || 1, size: size || 20 });
      }
    
      const response = await this.axiosInstance.get("/api/v1/processos", { params });
      return response.data;
    }
  • Input schema definition for the pje_listar_processos tool, specifying optional filter, page, and size parameters.
    inputSchema: {
      type: "object",
      properties: {
        filter: { type: "string", description: "Filtro para busca" },
        page: { type: "number", description: "Número da página" },
        size: { type: "number", description: "Tamanho da página" },
      },
    },
  • src/index.ts:331-333 (registration)
    Handler registration in the CallToolRequest switch statement, checking client configuration and delegating to listarProcessos method.
    case "pje_listar_processos":
      if (!this.pjeClient) throw new Error("PJE não configurado");
      return await this.listarProcessos(request.params.arguments);
  • src/index.ts:238-249 (registration)
    Tool registration in the ListTools response array, defining name, description, and schema.
    {
      name: "pje_listar_processos",
      description: "Lista processos com filtros opcionais",
      inputSchema: {
        type: "object",
        properties: {
          filter: { type: "string", description: "Filtro para busca" },
          page: { type: "number", description: "Número da página" },
          size: { type: "number", description: "Tamanho da página" },
        },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but only states it lists with optional filters. It doesn't disclose whether this is a read-only operation, if it requires authentication, pagination behavior, rate limits, or what happens when filters are omitted. For a list tool with 3 parameters and no annotation coverage, this leaves significant behavioral gaps.

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

Conciseness4/5

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

The description is a single, efficient Portuguese sentence that gets straight to the point. It's appropriately sized for a basic list operation, though it could be more front-loaded with critical context given the lack of annotations.

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?

For a tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'processos' means in this context, what the output looks like, error conditions, or how pagination works. The agent lacks necessary context to use this tool effectively beyond basic parameter passing.

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 description coverage is 100%, so parameters are documented in the schema. The description adds minimal value by mentioning 'filtros opcionais' which aligns with the 'filter' parameter but doesn't provide additional context about filter syntax, page/size defaults, or practical usage. Baseline 3 is appropriate when schema does the heavy lifting.

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

Purpose3/5

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

The description 'Lista processos com filtros opcionais' clearly states the action (list) and resource (processes), but it's vague about scope and doesn't differentiate from sibling tools like 'pje_buscar_processo' (which likely also searches/filters processes). It provides basic purpose but lacks specificity about what kind of processes or system context.

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?

The description mentions optional filters but provides no guidance on when to use this tool versus alternatives like 'pje_buscar_processo'. There's no indication of prerequisites, typical use cases, or when not to use it. The agent must infer usage from tool names alone.

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

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