Skip to main content
Glama
lucasliet

GitHub Copilot Usage MCP Server

by lucasliet

get_copilot_usage_formatted

Get a human-readable summary of your GitHub Copilot usage, including quotas, limits, and statistics.

Instructions

Obtém informações de uso do GitHub Copilot formatado humanizado

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'get_copilot_usage_formatted' tool. It calls formatUsageInfo() on the fetched usage data and returns a human-readable formatted text response.
    if (name === 'get_copilot_usage_formatted') {
      const formatted = formatUsageInfo(usageData);
      return { content: [{ type: 'text', text: formatted }] };
  • src/server.js:22-26 (registration)
    Registration of the 'get_copilot_usage_formatted' tool in the listToolsHandler, defining its name, description, and input schema.
    {
      name: 'get_copilot_usage_formatted',
      description: 'Obtém informações de uso do GitHub Copilot formatado humanizado',
      inputSchema: { type: 'object', properties: {}, required: [] }
    },
  • The main formatting function called by the handler. Converts raw Copilot usage data into a detailed human-readable string with quotas for chat, completions, and premium interactions.
    export function formatUsageInfo(data) {
      const formatQuota = (quota) => {
        if (quota.unlimited) {
          return 'Ilimitado';
        }
        return `${quota.remaining}/${quota.entitlement} (${quota.percent_remaining.toFixed(1)}% restante)`;
      };
    
      const formatted = `🤖 **GitHub Copilot - Status de Uso**\n\n` +
        `📋 **Informações Gerais:**\n` +
        `• Plano: ${data.copilot_plan}\n` +
        `• Tipo de acesso: ${data.access_type_sku}\n` +
        `• Chat habilitado: ${data.chat_enabled ? 'Sim' : 'Não'}\n` +
        `• Data de atribuição: ${formatDate(data.assigned_date)}\n` +
        `• Próxima renovação de cota: ${formatDate(data.quota_reset_date)}\n\n` +
    
        `📊 **Cotas de Uso:**\n` +
    
        `\n🗨️ **Chat:**\n` +
        `• Status: ${formatQuota(data.quota_snapshots.chat)}\n` +
        `• Overage permitido: ${data.quota_snapshots.chat.overage_permitted ? 'Sim' : 'Não'}\n` +
        `• Contador de overage: ${data.quota_snapshots.chat.overage_count}\n` +
    
        `\n💡 **Completions (Autocompletar):**\n` +
        `• Status: ${formatQuota(data.quota_snapshots.completions)}\n` +
        `• Overage permitido: ${data.quota_snapshots.completions.overage_permitted ? 'Sim' : 'Não'}\n` +
        `• Contador de overage: ${data.quota_snapshots.completions.overage_count}\n` +
    
        `\n⭐ **Interações Premium:**\n` +
        `• Status: ${formatQuota(data.quota_snapshots.premium_interactions)}\n` +
        `• Overage permitido: ${data.quota_snapshots.premium_interactions.overage_permitted ? 'Sim' : 'Não'}\n` +
        `• Contador de overage: ${data.quota_snapshots.premium_interactions.overage_count}\n`;
    
      if (data.organization_list && data.organization_list.length > 0) {
        return formatted + `\n🏢 **Organizações:**\n` + data.organization_list.map(org => `• ${org}`).join('\n') + '\n';
      }
    
      return formatted;
    }
  • Input schema for the tool (empty, as it takes no parameters).
    description: 'Obtém informações de uso do GitHub Copilot formatado humanizado',
    inputSchema: { type: 'object', properties: {}, required: [] }
Behavior2/5

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

No annotations exist, and the description does not disclose behavioral aspects such as read-only nature, rate limits, authentication requirements, or side effects. The verb 'gets' suggests a read operation, but this is not confirmed, leaving the agent with minimal behavioral insight.

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, front-loaded sentence that efficiently conveys the core purpose. Every word is justified, and there is no extraneous information.

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 the lack of an output schema, the description should compensate by explaining the return format or content. The phrase 'humanized format' is vague and does not clarify what data is returned. The tool is simple, but the description remains incomplete.

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?

There are zero parameters, so the schema coverage is 100% by default. The description adds no parameter details, but none are needed. Per guidelines, 0 parameters yields a baseline of 4.

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 that it retrieves GitHub Copilot usage information in a humanized format, specifying the verb 'gets' and the resource. However, it does not differentiate from sibling tools get_copilot_usage and get_copilot_usage_summary, which may overlap in function.

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?

No guidance is provided on when to use this tool versus alternatives like get_copilot_usage or get_copilot_usage_summary. The description implies a preference for human-readable output, but this is not explicitly stated as a usage condition.

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/lucasliet/copilot-usage-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server