Skip to main content
Glama

pje_status

Check the configuration and connection status of the Brazilian Electronic Judicial Process (PJE) system to verify integration readiness.

Instructions

Verifica o status da configuração e conexão do PJE

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'pje_status' tool. It generates a detailed status report of the PJE configuration, environment variables, client status, and authentication details.
    private async verificarStatus() {
      const envConfig = {
        baseUrl: process.env.PJE_BASE_URL,
        appName: process.env.PJE_APP_NAME,
        ssoUrl: process.env.PJE_SSO_URL,
        clientId: process.env.PJE_CLIENT_ID,
        clientSecret: process.env.PJE_CLIENT_SECRET,
        username: process.env.PJE_USERNAME ? '***' : undefined,
        password: process.env.PJE_PASSWORD ? '***' : undefined,
        certificatePath: process.env.PJE_CERTIFICATE_PFX_PATH,
        certificatePassword: process.env.PJE_CERTIFICATE_PFX_PASSWORD ? '***' : undefined,
        certificateThumbprint: process.env.PJE_CERTIFICATE_THUMBPRINT,
      };
    
      let statusText = `🔍 **STATUS DO PJE MCP SERVER**\n\n`;
      statusText += `🔧 **Configuração do arquivo .env:**\n`;
      statusText += `- URL Base: ${envConfig.baseUrl || '❌ Não configurado'}\n`;
      statusText += `- App Name: ${envConfig.appName || '❌ Não configurado'}\n`;
      statusText += `- SSO URL: ${envConfig.ssoUrl || '❌ Não configurado'}\n`;
      statusText += `- Client ID: ${envConfig.clientId || '❌ Não configurado'}\n`;
      statusText += `- Client Secret: ${envConfig.clientSecret || '❌ Não configurado'}\n`;
      statusText += `- Username: ${envConfig.username || '❌ Não configurado'}\n`;
      statusText += `- Password: ${envConfig.password || '❌ Não configurado'}\n\n`;
      
      statusText += `🔐 **Certificado Digital:**\n`;
      statusText += `- Arquivo PFX: ${envConfig.certificatePath || '❌ Não configurado'}\n`;
      statusText += `- Senha PFX: ${envConfig.certificatePassword || '❌ Não configurado'}\n`;
      statusText += `- Thumbprint: ${envConfig.certificateThumbprint || '❌ Não configurado'}\n\n`;
    
      statusText += `🔗 **Conexão:**\n`;
      if (!this.pjeClient) {
        statusText += `- Status: ❌ Cliente não configurado\n`;
        statusText += `- Solução: Execute 'pje_configurar' primeiro\n\n`;
      } else {
        statusText += `- Status: ✅ Cliente configurado\n`;
        if ((this.pjeClient as any).accessToken) {
          statusText += `- Autenticação: ✅ Token ativo\n`;
        } else if ((this.pjeClient as any).certificateManager) {
          statusText += `- Autenticação: 🔐 Certificado configurado\n`;
        } else {
          statusText += `- Autenticação: ⚠️ Apenas consultas públicas\n`;
        }
      }
    
      statusText += `\n💡 **Próximos passos:**\n`;
      if (!envConfig.baseUrl) {
        statusText += `1. Configure PJE_BASE_URL no arquivo .env\n`;
      }
      if (!envConfig.certificatePath && !envConfig.ssoUrl) {
        statusText += `2. Configure certificado digital ou credenciais SSO no arquivo .env\n`;
      }
      if (!this.pjeClient) {
        statusText += `3. Execute: 'Configure o PJE'\n`;
      } else {
        statusText += `3. ✅ Pronto para usar!\n`;
      }
    
      return {
        content: [
          {
            type: "text",
            text: statusText,
          },
        ],
      };
    }
  • The tool schema definition including name, description, and empty input schema for 'pje_status'.
      name: "pje_status",
      description: "Verifica o status da configuração e conexão do PJE",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • src/index.ts:346-347 (registration)
    The switch case that registers and routes calls to the 'pje_status' tool to its handler method.
    case "pje_status":
      return await this.verificarStatus();
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool verifies status, implying a read-only, diagnostic operation, but doesn't detail what 'status' includes (e.g., connectivity, configuration validity), potential errors, or output format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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

Conciseness5/5

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

The description is a single, clear sentence in Portuguese: 'Verifica o status da configuração e conexão do PJE.' It's front-loaded with the core action and resource, with zero wasted words. Every part of the sentence directly contributes to understanding the tool's function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (0 parameters, no annotations, no output schema), the description is minimally adequate. It states what the tool does but lacks details on behavior, output, or usage context. For a diagnostic tool, more information on what 'status' entails would improve completeness, but it meets the basic requirement for a simple tool.

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, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter details, so it appropriately focuses on the tool's purpose. With no parameters, the baseline is 4, as there's nothing to compensate for.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Verifica o status da configuração e conexão do PJE' (Verifies the status of PJE configuration and connection). It uses specific verbs ('verifica') and resources ('configuração e conexão do PJE'), making the action clear. However, it doesn't explicitly distinguish this from sibling tools like 'pje_configurar' or 'pje_configurar_certificado', which might handle configuration tasks.

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. It doesn't mention prerequisites (e.g., after configuration), exclusions, or how it differs from siblings like 'pje_info_certificado' (which might check certificate info). Without such context, users must infer usage from the purpose 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