Skip to main content
Glama

get_user_repository

Retrieve a specific repository from AtomGit by providing the owner's username and repository name to access open-source collaboration resources.

Instructions

Search for AtomGit user repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesSearch query owner
repoYesSearch query repo

Implementation Reference

  • The core handler function that makes the API request to fetch the user repository details from AtomGit and parses the response using the output schema.
    export async function getUserRepository(
      owner: string = '',
      repo: string = ''
    ) {
      const url = `https://api.atomgit.com/repos/${encodeURIComponent(owner.toString())}/${encodeURIComponent(repo.toString())}`;
    
      const response = await atomGitRequest(url.toString());
      console.log("API Response:", JSON.stringify(response, null, 2));
      return AtomGitGetUserRepositorySchema.parse(response);
    }
  • index.ts:82-85 (registration)
    Registration of the 'get_user_repository' tool in the MCP server's listTools response, including name, description, and input schema.
      name: "get_user_repository",
      description: "Search for AtomGit user repository",
      inputSchema: zodToJsonSchema(repository.getUserRepositorySchema),
    },
  • The MCP CallToolRequest handler case that parses input arguments and invokes the core getUserRepository function, formatting the response.
    case "get_user_repository": {
      const args = repository.getUserRepositorySchema.parse(request.params.arguments);
      const results = await repository.getUserRepository(
        args.owner,
        args.repo,
      );
      return {
        content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
      };
    }
  • Input schema validation for the get_user_repository tool using Zod.
    export const getUserRepositorySchema = z.object({
      owner: z.string().describe("Search query owner"),
      repo: z.string().describe("Search query repo"),
    });
  • Output schema for parsing the AtomGit repository response.
    export const AtomGitGetUserRepositorySchema = z.object({
      allowAutoMerge: z.boolean(),
      allowForking: z.boolean(),
      allowMergeCommit: z.boolean(),
      allowRebaseMerge: z.boolean(),
      allowSquashMerge: z.boolean(),
      allowUpdateBranch: z.boolean(),
      anonymousAccessEnabled: z.boolean(),
      archived: z.boolean(),
      codeOfConduct: z.union([z.string(), z.null()]),
      contributors_url: z.union([z.string(), z.null()]),
      createdAt: z.string(),
      default_branch: z.string(),
      deleteBranchOnMerge: z.boolean(),
      deployments_url: z.union([z.string(), z.null()]),
      description: z.union([z.string(), z.null()]),
      disabled: z.boolean(),
      downloads_url: z.union([z.string(), z.null()]),
      events_url: z.union([z.string(), z.null()]),
      fork: z.boolean(),
      forks: z.number(),
      forksCount: z.number(),
      forks_url: z.union([z.string(), z.null()]),
      full_name: z.string(),
      hasDiscussions: z.boolean(),
      hasDownloads: z.boolean(),
      hasIssues: z.boolean(),
      hasPages: z.boolean(),
      hasProjects: z.boolean(),
      hasWiki: z.boolean(),
      homepage: z.union([z.string(), z.null()]),
      hooksUrl: z.union([z.string(), z.null()]),
      html_url: z.string(),
      id: z.number(),
      isTemplate: z.boolean(),
      languages_url: z.union([z.string(), z.null()]),
      license: z.union([z.string(), z.null()]),
      mergeCommitMessage: z.union([z.string(), z.null()]),
      mergeCommitTitle: z.union([z.string(), z.null()]),
      merges_url: z.union([z.string(), z.null()]),
      mirrorUrl: z.union([z.string(), z.null()]),
      name: z.string(),
      organization: z.union([z.string(), z.null()]),
      owner: z.union([z.string(), z.null()]),
      parent: z.union([z.string(), z.null()]),
      permissions: z.union([z.string(), z.null()]),
      private: z.boolean(),
      pushedAt: z.union([z.string(), z.null()]),
      securityAndAnalysis: z.union([z.string(), z.null()]),
      source: z.union([z.string(), z.null()]),
      squashMergeCommitMessage: z.union([z.string(), z.null()]),
      squashMergeCommitTitle: z.union([z.string(), z.null()]),
      stargazers_url: z.union([z.string(), z.null()]),
      subscribers_url: z.union([z.string(), z.null()]),
      subscription_url: z.union([z.string(), z.null()]),
      svnUrl: z.union([z.string(), z.null()]),
      tagsUrl: z.union([z.string(), z.null()]),
      teamsUrl: z.union([z.string(), z.null()]),
      templateRepository: z.union([z.string(), z.null()]),
      topics: z.array(z.string()),
      updatedAt: z.string(),
      url: z.string(),
      useSquashPrTitleAsDefault: z.boolean(),
      visibility: z.string(),
      webCommitSignoffRequired: z.boolean(),
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool performs a search but doesn't describe what the search returns (e.g., repository details, a list), how results are formatted, error conditions, or any rate limits. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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 directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it easy for an agent to parse quickly.

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?

Given the tool's complexity (a search operation with no annotations and no output schema), the description is insufficient. It doesn't explain what the search returns, how results are structured, or any behavioral nuances, leaving the agent with incomplete context for effective use.

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?

The input schema has 100% description coverage, with clear documentation for both required parameters ('owner' and 'repo'). The description adds no additional parameter semantics beyond what the schema provides, such as examples or search behavior details. This meets the baseline of 3 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 clearly states the action ('Search for') and resource ('AtomGit user repository'), making the purpose evident. However, it doesn't explicitly distinguish this tool from its sibling 'get_user_repositories' (plural), which appears to be a similar listing tool, leaving some ambiguity about when to use one versus the other.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or comparisons to sibling tools like 'get_user_repositories' or 'get_org_repositories', leaving the agent to infer usage based on the name and parameters alone.

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