Skip to main content
Glama
hongsw
by hongsw

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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), }, ], }; } }
  • 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`); } }
  • 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'], }, }, ], }; });

Other Tools

Related 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/hongsw/pair-role-mcp-server'

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