pje_buscar_processo
Search for specific judicial processes by ID in Brazil's Electronic Judicial Process (PJE) system using digital certificates for secure access.
Instructions
Busca um processo específico por ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID do processo |
Implementation Reference
- src/index.ts:251-260 (schema)Input schema definition for the 'pje_buscar_processo' tool, specifying the required 'id' parameter.name: "pje_buscar_processo", description: "Busca um processo específico por ID", inputSchema: { type: "object", properties: { id: { type: "string", description: "ID do processo" }, }, required: ["id"], }, },
- src/index.ts:334-336 (registration)Registration of the tool handler in the CallToolRequestSchema switch statement.case "pje_buscar_processo": if (!this.pjeClient) throw new Error("PJE não configurado"); return await this.buscarProcesso(request.params.arguments);
- src/index.ts:470-482 (handler)Main handler function for the tool that extracts the process ID, calls PJEClient.buscarProcesso, and formats the response.private async buscarProcesso(args: any) { const { id } = args; const result = await this.pjeClient!.buscarProcesso(id); return { content: [ { type: "text", text: `📄 **Detalhes do processo:**\n\n${JSON.stringify(result, null, 2)}`, }, ], }; }
- src/index.ts:181-184 (helper)PJEClient helper method that performs the actual HTTP GET request to the PJE API to fetch the process details by ID.async buscarProcesso(id: string): Promise<PJEResponse> { const response = await this.axiosInstance.get(`/api/v1/processos/${id}`); return response.data; }