refresh-agents
Update agent templates from a GitHub repository to ensure access to the latest specialized roles for project teams.
Instructions
Refresh agents from GitHub repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:2337-2367 (handler)Handler logic for the refresh action within the 'manage-agents' MCP tool. Calls agentManager.refreshAgentsFromGitHub() to refresh the agent cache from GitHub and returns success status.case 'refresh': { try { await agentManager.refreshAgentsFromGitHub(); const agents = agentManager.getAllAgents(); return { content: [ { type: 'text', text: JSON.stringify({ success: true, count: agents.length, message: `Successfully refreshed agents from GitHub. Total agents: ${agents.length}`, }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: JSON.stringify({ success: false, error: `Failed to refresh agents: ${error}`, }, null, 2), }, ], }; } }
- src/agentManager.ts:276-287 (helper)Core helper function refreshAgentsFromGitHub() that fetches all agents from GitHub repository and updates the local agents cache.async refreshAgentsFromGitHub(): Promise<void> { const agents = await this.githubIntegration.fetchAllAgentsFromGitHub(); for (const agent of agents) { const key = agent.language === 'en' ? agent.name : `${agent.name}-${agent.language}`; this.agentsCache.set(key, agent); } if (this.debug) { console.error(`[MCP Sub-Agents] Refreshed ${agents.length} agents from GitHub`); } }
- src/index.ts:1522-1555 (schema)Input schema definition for the 'manage-agents' tool in ListTools response, including 'refresh' as one of the possible actions.name: 'manage-agents', description: 'Install agents, get stats, or refresh from GitHub', inputSchema: { type: 'object', properties: { action: { type: 'string', description: 'Management action to perform', enum: ['install', 'stats', 'refresh', 'version'], }, agentNames: { type: 'array', items: { type: 'string' }, description: 'Agent names to install (for install action)', }, targetPath: { type: 'string', description: 'Target directory for installation (for install action)', }, language: { type: 'string', description: 'Language preference for agents', enum: ['en', 'ko', 'ja', 'zh'], default: 'en', }, limit: { type: 'number', description: 'Number of top agents to show in stats', default: 10, }, }, required: ['action'], }, },
- src/index.ts:1543-1558 (registration)Registration of the 'manage-agents' tool (which includes refresh functionality) in the MCP server's ListTools response.description: 'Language preference for agents', enum: ['en', 'ko', 'ja', 'zh'], default: 'en', }, limit: { type: 'number', description: 'Number of top agents to show in stats', default: 10, }, }, required: ['action'], }, }, ], }; });