github_activity_get_repo_subscription
Check your subscription status for any GitHub repository. Provide the owner and repo name to view subscription details.
Instructions
Get a repository subscription
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | owner | |
| repo | Yes | repo |
Implementation Reference
- src/tools/activity.ts:211-213 (handler)The handler function that executes the tool logic for github_activity_get_repo_subscription. It makes a GET request to /repos/{owner}/{repo}/subscription.
handler: async (args: Record<string, any>) => { return githubRequest("GET", `/repos/${args.owner}/${args.repo}/subscription`, undefined, undefined); }, - src/tools/activity.ts:207-210 (schema)Input schema for the tool, requiring 'owner' and 'repo' string parameters.
inputSchema: z.object({ owner: z.string().describe("owner"), repo: z.string().describe("repo") }), - src/tools/activity.ts:204-214 (registration)The tool definition object with name 'github_activity_get_repo_subscription', description, inputSchema, and handler — part of the activityTools array.
{ name: "github_activity_get_repo_subscription", description: "Get a repository subscription", inputSchema: z.object({ owner: z.string().describe("owner"), repo: z.string().describe("repo") }), handler: async (args: Record<string, any>) => { return githubRequest("GET", `/repos/${args.owner}/${args.repo}/subscription`, undefined, undefined); }, }, - src/index.ts:110-130 (registration)Tools are registered via server.tool() in a loop. The tool's name, description, inputSchema, and handler are passed to the MCP server.
for (const tool of allTools) { server.tool( tool.name, tool.description, tool.inputSchema.shape as any, async (args: any) => { try { const result = await tool.handler(args as any); return { content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }], }; } catch (err) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } ); } - src/index.ts:57-57 (registration)The activityTools array (containing the tool) is imported and placed in the 'activity' category for registration.
{ category: "activity", tools: activityTools },