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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.js:48-50 (handler)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: [] } }, - src/formatter.js:32-70 (helper)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; } - src/server.js:24-25 (schema)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: [] }