Skip to main content
Glama

get_user_repositories

Retrieve and search repositories for a specific AtomGit user, enabling repository discovery and management with pagination support.

Instructions

Search for AtomGit user repositories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesSearch query username
per_pageNoPage number for pagination (default: 1)
pageNoNumber of results per page (default: 10)
searchNoSearch query content

Implementation Reference

  • Core implementation of get_user_repositories tool: constructs API URL for user's repositories with pagination and search params, calls atomGitRequest, returns raw response.
    export async function getUserRepositories(
      username: string,
      per_page: number = 10,
      page: number = 1,
      search?: string
    ) {
      let url = `https://api.atomgit.com/users/${encodeURIComponent(username)}/repos`;
    
      const params = new URLSearchParams();
      if (per_page) params.append('per_page', per_page.toString());
      if (page) params.append('page', page.toString());
      if (search) params.append('search', search);
    
      const queryString = params.toString();
      if (queryString) {
        url += `?${queryString}`;
      }
      const response = await atomGitRequest(url.toString());
      return response;
    }
  • Zod input schema defining parameters for get_user_repositories: username (required), per_page, page, search (optional).
    export const getUserRepositoriesSchema = z.object({
      username: z.string().describe("Search query username"),
      per_page: z.number().optional().describe("Page number for pagination (default: 1)"),
      page: z.number().optional().describe("Number of results per page (default: 10)"),
      search: z.string().optional().describe("Search query content"),
    });
  • index.ts:112-115 (registration)
    MCP tool registration in listTools response: defines name, description, and converts Zod schema to JSON schema.
      name: "get_user_repositories",
      description: "Search for AtomGit user repositories",
      inputSchema: zodToJsonSchema(repository.getUserRepositoriesSchema),
    },
  • Dispatcher in CallToolRequest handler: parses input arguments with schema, calls implementation function, formats response as MCP content.
    case "get_user_repositories": {
      const args = repository.getUserRepositoriesSchema.parse(request.params.arguments);
      const results = await repository.getUserRepositories(
        args.username,
        args.per_page,
        args.page,
        args.search,
      );
      return {
        content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Search' implies a read operation, but the description doesn't mention authentication requirements, rate limits, pagination behavior (beyond what's in the schema), error conditions, or what constitutes a 'search' versus a simple listing. This leaves significant gaps for an agent to understand how the tool behaves.

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, efficient sentence that gets straight to the point with zero wasted words. It's appropriately sized for a search/list tool and front-loads the essential information without unnecessary elaboration.

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?

For a search tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what constitutes a successful search, what format results return, how pagination works in practice, or how the 'username' and 'search' parameters interact. The agent would struggle to use this tool effectively without trial and error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents all four parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain how 'username' interacts with 'search', what 'per_page' and 'page' actually control, or provide examples of search queries. This meets the baseline for high schema coverage.

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 'Search for AtomGit user repositories' clearly states the action (search) and resource (user repositories), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'get_user_repository' (singular) or 'get_org_repositories', which would require more specific differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'get_user_repository' (singular) and 'get_org_repositories' available, there's no indication whether this is for searching across multiple users, filtering repositories, or other specific use cases that would help an agent choose appropriately.

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/kaiyuanxiaobing/atomgit-mcp-server'

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