pje_listar_certificados
Lists available digital certificates on Windows for accessing judicial data through the PJE MCP Server, ensuring compatibility with A1 and A3 certificate types.
Instructions
Lista certificados digitais disponíveis no Windows
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:306-313 (registration)Tool definition and schema registration in the ListToolsRequestSchema handler{ name: "pje_listar_certificados", description: "Lista certificados digitais disponíveis no Windows", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:350-351 (registration)Tool handler dispatch in the CallToolRequestSchema switch statementcase "pje_listar_certificados": return await this.listarCertificados();
- src/index.ts:648-669 (handler)Main handler function that executes 'certutil -store My' to list Windows certificates and returns formatted responseprivate async listarCertificados() { try { const { stdout } = await execAsync('certutil -store My'); return { content: [ { type: "text", text: `🔍 **Certificados Digitais Disponíveis no Windows**\n\n${stdout}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `❌ **Erro ao Listar Certificados**\n\n${error instanceof Error ? error.message : String(error)}\n\n**Nota:** Esta funcionalidade requer Windows e acesso ao Certificate Store.`, }, ], }; } }
- src/utils.ts:1-4 (helper)Utility function execAsync used by the handler to run shell commands asynchronouslyimport { exec } from 'child_process'; import { promisify } from 'util'; export const execAsync = promisify(exec);