Skip to main content
Glama

pje_info_certificado

Display configured certificate information for accessing Brazilian judicial data through the PJE system, supporting A1 and A3 digital certificates.

Instructions

Mostra informações sobre o certificado configurado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic: checks if a certificate is configured, retrieves certificate info using pjeClient.getCertificateInfo(), formats a detailed text response with subject, issuer, technical details, and validity status, and returns it as MCP content.
    private async infoCertificado() {
      try {
        if (!this.pjeClient || !(this.pjeClient as any).certificateManager) {
          return {
            content: [
              {
                type: "text",
                text: `❌ **Nenhum Certificado Configurado**\n\nExecute 'pje_configurar_certificado' primeiro para carregar um certificado digital.`,
              },
            ],
          };
        }
        
        const info = this.pjeClient.getCertificateInfo();
        
        let texto = `🎯 **Informações do Certificado Digital Atual**\n\n`;
        
        texto += `**Subject:**\n`;
        info.subject.forEach((attr: any) => {
          texto += `- ${attr.name}: ${attr.value}\n`;
        });
        
        texto += `\n**Emissor:**\n`;
        info.issuer.forEach((attr: any) => {
          texto += `- ${attr.name}: ${attr.value}\n`;
        });
        
        texto += `\n**Detalhes Técnicos:**\n`;
        texto += `- Serial Number: ${info.serialNumber}\n`;
        texto += `- Thumbprint: ${info.thumbprint}\n`;
        texto += `- Válido de: ${new Date(info.notBefore).toLocaleString('pt-BR')}\n`;
        texto += `- Válido até: ${new Date(info.notAfter).toLocaleString('pt-BR')}\n`;
        
        const agora = new Date();
        const validade = new Date(info.notAfter);
        
        if (agora > validade) {
          texto += `\n⚠️ **AVISO: Certificado EXPIRADO!**\n`;
        } else {
          const diasRestantes = Math.floor((validade.getTime() - agora.getTime()) / (1000 * 60 * 60 * 24));
          texto += `\n✅ **Certificado válido por mais ${diasRestantes} dias**\n`;
        }
        
        return {
          content: [
            {
              type: "text",
              text: texto,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `❌ **Erro ao Obter Informações do Certificado**\n\n${error instanceof Error ? error.message : String(error)}`,
            },
          ],
        };
      }
    }
  • src/index.ts:314-321 (registration)
    Tool registration in the ListTools handler, defining name, description, and input schema (empty object, no parameters required).
    {
      name: "pje_info_certificado",
      description: "Mostra informações sobre o certificado configurado",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:352-353 (registration)
    Tool dispatch registration in the CallToolRequestHandler switch statement, routing calls to the infoCertificado method.
    case "pje_info_certificado":
      return await this.infoCertificado();
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'shows information' which implies a read-only operation, but doesn't clarify what information is shown, whether authentication is required, if there are rate limits, or what happens if no certificate is configured. The description is too minimal for a tool with no annotation coverage.

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 concise sentence that gets straight to the point. There's no wasted verbiage or unnecessary elaboration. However, the brevity comes at the cost of completeness for other dimensions.

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?

Given no annotations, no output schema, and a vague description, this is inadequate for a tool that presumably returns certificate information. The description doesn't explain what information is returned, in what format, or what 'configured certificate' means in context. For a tool that likely provides system configuration information, more context is needed.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description doesn't need to compensate for any parameter gaps. A baseline of 4 is appropriate since there are no parameters to explain beyond what the schema provides.

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 'Mostra informações sobre o certificado configurado' states what the tool does (shows information about the configured certificate) but is vague about scope and specificity. It doesn't distinguish from sibling tools like 'pje_listar_certificados' or 'pje_configurar_certificado', leaving ambiguity about whether this shows a single configured certificate or lists multiple certificates.

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 provides no guidance on when to use this tool versus alternatives. With siblings like 'pje_listar_certificados' (likely lists all certificates) and 'pje_configurar_certificado' (likely configures certificates), there's no indication of when this specific info tool is appropriate versus those alternatives.

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