get_user_stars_count
Count the stars a user received within a date range. Specify user ID and optional dates to get the star count.
Instructions
Returns the count of stars received by a user
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | User ID | |
| since | No | Count stars received after this date (yyyy-MM-dd) | |
| until | No | Count stars received before this date (yyyy-MM-dd) | |
| organization | No | Optional organization name. Use list_organizations to inspect available organizations. |
Implementation Reference
- src/tools/getUserStarsCount.ts:46-48 (handler)The handler function that executes the 'get_user_stars_count' tool logic. It calls backlog.getUserStarsCount with userId, since, and until parameters.
handler: async ({ userId, since, until }) => backlog.getUserStarsCount(userId, { since, until }), }; - src/tools/getUserStarsCount.ts:7-29 (schema)Input schema defining the tool's parameters: userId (number, required), since (string, optional), until (string, optional).
const getUserStarsCountSchema = buildToolSchema((t) => ({ userId: z .number() .describe(t('TOOL_GET_USER_STARS_COUNT_USER_ID', 'User ID')), since: z .string() .optional() .describe( t( 'TOOL_GET_USER_STARS_COUNT_SINCE', 'Count stars received after this date (yyyy-MM-dd)' ) ), until: z .string() .optional() .describe( t( 'TOOL_GET_USER_STARS_COUNT_UNTIL', 'Count stars received before this date (yyyy-MM-dd)' ) ), })); - Output schema (StarCountSchema) defining the response shape: an object with a count (number) field.
export const StarCountSchema = z.object({ count: z.number(), }); - src/tools/tools.ts:77-77 (registration)Registration of the getUserStarsCountTool in the 'space' toolset within the allTools function.
getUserStarsCountTool(backlog, helper), - src/tools/tools.ts:35-35 (registration)Import statement for getUserStarsCountTool in the tools registration file.
import { getUserStarsCountTool } from './getUserStarsCount.js';