Skip to main content
Glama

github_activity_list_repo_events

List repository events by owner and repo, with optional pagination limits.

Instructions

List repository events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesowner
repoYesrepo
per_pageNoThe number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
pageNoThe page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."

Implementation Reference

  • Handler function for github_activity_list_repo_events that makes a GET request to /repos/{owner}/{repo}/events with optional pagination parameters.
    handler: async (args: Record<string, any>) => {
      return githubRequest("GET", `/repos/${args.owner}/${args.repo}/events`, undefined, { per_page: args.per_page, page: args.page });
    },
  • Input schema definition for github_activity_list_repo_events, requiring owner and repo strings, with optional per_page and page parameters.
    name: "github_activity_list_repo_events",
    description: "List repository events",
    inputSchema: z.object({
      owner: z.string().describe("owner"),
      repo: z.string().describe("repo"),
      per_page: z.number().optional().describe("The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\""),
      page: z.number().optional().describe("The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"")
    }),
  • src/index.ts:55-100 (registration)
    Tools are registered in the activity category via allToolModules array, then each tool is registered with server.tool() at line 111.
    const allToolModules = [
      { category: "actions", tools: actionsTools },
      { category: "activity", tools: activityTools },
      { category: "agent-tasks", tools: agentTasksTools },
      { category: "apps", tools: appsTools },
      { category: "billing", tools: billingTools },
      { category: "campaigns", tools: campaignsTools },
      { category: "checks", tools: checksTools },
      { category: "classroom", tools: classroomTools },
      { category: "code-scanning", tools: codeScanningTools },
      { category: "code-security", tools: codeSecurityTools },
      { category: "codes-of-conduct", tools: codesOfConductTools },
      { category: "codespaces", tools: codespacesTools },
      { category: "copilot", tools: copilotTools },
      { category: "credentials", tools: credentialsTools },
      { category: "dependabot", tools: dependabotTools },
      { category: "dependency-graph", tools: dependencyGraphTools },
      { category: "emojis", tools: emojisTools },
      { category: "enterprise-team-memberships", tools: enterpriseTeamMembershipsTools },
      { category: "enterprise-team-organizations", tools: enterpriseTeamOrganizationsTools },
      { category: "enterprise-teams", tools: enterpriseTeamsTools },
      { category: "gists", tools: gistsTools },
      { category: "git", tools: gitTools },
      { category: "gitignore", tools: gitignoreTools },
      { category: "hosted-compute", tools: hostedComputeTools },
      { category: "interactions", tools: interactionsTools },
      { category: "issues", tools: issuesTools },
      { category: "licenses", tools: licensesTools },
      { category: "markdown", tools: markdownTools },
      { category: "meta", tools: metaTools },
      { category: "migrations", tools: migrationsTools },
      { category: "oidc", tools: oidcTools },
      { category: "orgs", tools: orgsTools },
      { category: "packages", tools: packagesTools },
      { category: "private-registries", tools: privateRegistriesTools },
      { category: "projects", tools: projectsTools },
      { category: "pulls", tools: pullsTools },
      { category: "rate-limit", tools: rateLimitTools },
      { category: "reactions", tools: reactionsTools },
      { category: "repos", tools: reposTools },
      { category: "search", tools: searchTools },
      { category: "secret-scanning", tools: secretScanningTools },
      { category: "security-advisories", tools: securityAdvisoriesTools },
      { category: "teams", tools: teamsTools },
      { category: "users", tools: usersTools },
    ];
  • The githubRequest helper function used by the handler to make authenticated HTTP requests to the GitHub API.
    export async function githubRequest<T>(
      method: string,
      path: string,
      body?: Record<string, unknown>,
      params?: Record<string, string | number | boolean | string[] | undefined>
    ): Promise<T> {
      const url = new URL(`${BASE_URL}${path}`);
    
      if (params) {
        for (const [key, value] of Object.entries(params)) {
          if (value === undefined || value === null || value === "") continue;
          if (Array.isArray(value)) {
            url.searchParams.set(key, value.join(","));
          } else {
            url.searchParams.set(key, String(value));
          }
        }
      }
    
      const headers: Record<string, string> = {
        Authorization: `Bearer ${getToken()}`,
        Accept: "application/vnd.github+json",
        "X-GitHub-Api-Version": "2022-11-28",
        "User-Agent": "github-mcp/1.0.0",
      };
    
      if (body) {
        headers["Content-Type"] = "application/json";
      }
    
      const res = await fetch(url.toString(), {
        method,
        headers,
        body: body ? JSON.stringify(body) : undefined,
      });
    
      if (!res.ok) {
        const text = await res.text().catch(() => "");
        let detail = text;
        try {
          const json = JSON.parse(text);
          detail = json.message || text;
          if (json.errors) detail += ` -- ${JSON.stringify(json.errors)}`;
        } catch {}
        throw new Error(`GitHub API error ${res.status}: ${detail}`);
      }
    
      if (res.status === 204) return {} as T;
    
      return res.json() as Promise<T>;
    }
Behavior2/5

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

With no annotations provided, the description must fully disclose behavioral traits. It only states 'List repository events' and omits details such as pagination behavior, event types included, authentication requirements, rate limits, or output format. This is insufficient for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at three words, which is efficient for a simple list operation. However, it may be too terse given the lack of other context; still, it is not verbose and every word contributes to the core message.

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?

The tool has moderate complexity with pagination parameters and no output schema. The description fails to mention return values, event types, ordering, or any side effects. It is not sufficiently complete given the missing output schema and lack of annotations.

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 explanations for parameters like per_page and page (including links to pagination docs). The tool description adds no additional meaning beyond what the schema already provides, so a baseline score of 3 is appropriate.

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 'List repository events' clearly identifies the verb (list) and resource (repository events), making the tool's purpose unambiguous. However, it does not explicitly differentiate it from sibling tools like list_public_events or list_events_for_authenticated_user, but the resource is specific enough.

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. There is no mention of context, prerequisites, or exclusions, leaving the agent without enough information to decide 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/Eyalm321/github-mcp'

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