Skip to main content
Glama

pje_listar_processos

Retrieve and filter judicial processes from the Brazilian PJE system using optional parameters like search terms, page number, and page size, facilitated by the PJE MCP Server.

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

  • The main handler function for the 'pje_listar_processos' tool in PJEServer class. Extracts filter, page, size from arguments, calls PJEClient.listarProcessos, and returns formatted text response.
    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)}`, }, ], };
  • Input schema definition for the 'pje_listar_processos' tool, specifying optional filter, page, and size parameters.
    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" }, }, }, },
  • src/index.ts:331-333 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement within setupToolHandlers(). Dispatches to the listarProcessos method.
    case "pje_listar_processos": if (!this.pjeClient) throw new Error("PJE não configurado"); return await this.listarProcessos(request.params.arguments);
  • Helper method in PJEClient class that constructs query parameters and makes the API GET request to /api/v1/processos to list processes.
    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; }

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