Skip to main content
Glama

check_if_user_is_assignable

Verify whether a specific user can be assigned to an issue in an AtomGit repository before making the assignment.

Instructions

Check if a user can be assigned to an issue in a AtomGit repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner
repoYesRepository name
assigneeYesUsername to be checked

Implementation Reference

  • The core handler function that performs the GET request to the AtomGit API endpoint to check if a user is assignable.
    export async function checkIfUserIsAssignable(
      owner: string,
      repo: string,
      assignee: string
    ) {
      return atomGitRequest(
        `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/assignees/${encodeURIComponent(assignee)}`,
        {
          method: "GET",
        }
      );
    }
  • Zod schema defining the input parameters for the tool: owner, repo, and assignee.
    export const CheckAssigneeSchema = z.object({
      owner: z.string().describe("Repository owner"),
      repo: z.string().describe("Repository name"),
      assignee: z.string().describe("Username to be checked"),
    });
  • index.ts:106-110 (registration)
    Registration of the tool in the MCP server's ListTools response, specifying name, description, and input schema.
    {
      name: "check_if_user_is_assignable",
      description: "Check if a user can be assigned to an issue in a AtomGit repository",
      inputSchema: zodToJsonSchema(issues.CheckAssigneeSchema),
    },
  • Dispatch handler in the main CallToolRequest that validates arguments and calls the core handler function.
    case "check_if_user_is_assignable": {
      const args = issues.CheckAssigneeSchema.parse(request.params.arguments);
      const { owner, repo, assignee } = args;
    
      const result = await issues.checkIfUserIsAssignable(owner, repo, assignee);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }

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