Skip to main content
Glama

list_repos

Lists all configured git repositories to aggregate commit data for automated CV/resume generation with LaTeX formatting support.

Instructions

List all configured git repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the list_repos tool handler. It iterates over the REPO_DICT, formats a list of configured repositories with paths, adds total count and usage instructions, and returns as TextContent.
    async def list_repos_tool() -> list[TextContent]: """List all configured repositories.""" if not REPO_DICT: return [TextContent( type="text", text="No repositories configured" )] output = "Configured Repositories:\n\n" for name, path in REPO_DICT.items(): output += f"- {name}: {path}\n" output += f"\nTotal: {len(REPO_DICT)} repository" + ("ies" if len(REPO_DICT) > 1 else "") output += "\n\nUsage:\n" output += "- Use 'get_git_log_by_repo' to get commits from a specific repo\n" output += "- Use 'get_git_log_all_repos' to get commits from all repos" return [TextContent(type="text", text=output)]
  • Registration of the list_repos tool in the @app.list_tools() function, specifying the name, description, and empty input schema (no parameters required).
    Tool( name="list_repos", description="List all configured git repositories", inputSchema={ "type": "object", "properties": {} } ),
  • Input schema for the list_repos tool, defining an object with no properties (no input parameters needed).
    inputSchema={ "type": "object", "properties": {} }
  • Dispatch logic in the @app.call_tool() handler that routes calls to the list_repos tool to the list_repos_tool function.
    elif name == "list_repos": return await list_repos_tool()
  • Helper function parse_repos() that parses the REPOS environment variable into REPO_DICT, which is used by list_repos_tool to list repositories. Includes fallbacks for REPO_PATH and current directory.
    def parse_repos() -> dict: """Parse REPOS environment variable into a dictionary.""" repos = {} # Parse REPOS if provided if REPOS: for repo_entry in REPOS.split(","): if ":" in repo_entry: name, path = repo_entry.split(":", 1) repos[name.strip()] = path.strip() # Backward compatibility: if REPO_PATH is set and no REPOS, use it as default if REPO_PATH and not repos: repos["default"] = REPO_PATH # If nothing configured, use current directory as default if not repos: repos["default"] = os.getcwd() return repos

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/eyaab/cv-resume-builder-mcp'

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