get_myself
Retrieve information about the currently authenticated Backlog user, including profile details and permissions.
Instructions
Returns information about the authenticated user
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| organization | No | Optional organization name. Use list_organizations to inspect available organizations. |
Implementation Reference
- src/tools/getMyself.ts:9-27 (handler)The handler function for the 'get_myself' tool. It calls backlog.getMyself() (from the backlog-js library) and returns the authenticated user's information.
export const getMyselfTool = ( backlog: Backlog, { t }: TranslationHelper ): ToolDefinition< ReturnType<typeof getMyselfSchema>, (typeof UserSchema)['shape'] > => { return { name: 'get_myself', description: t( 'TOOL_GET_MYSELF_DESCRIPTION', 'Returns information about the authenticated user' ), schema: z.object(getMyselfSchema(t)), outputSchema: UserSchema, importantFields: ['id', 'userId', 'name', 'roleType'], handler: async () => backlog.getMyself(), }; }; - UserSchema defines the output shape for get_myself tool: id, userId, name, roleType, lang, mailAddress, lastLoginTime.
export const UserSchema = z.object({ id: z.number(), userId: z.string(), name: z.string(), roleType: RoleTypeSchema, lang: LanguageSchema, mailAddress: z.string(), lastLoginTime: z.string(), }); - src/tools/getMyself.ts:7-7 (schema)Schema for get_myself — takes no parameters (empty object).
const getMyselfSchema = buildToolSchema((_t) => ({})); - src/tools/tools.ts:78-78 (registration)Registration of getMyselfTool in the 'space' toolset group.
getMyselfTool(backlog, helper), - src/tools/tools.ts:22-22 (registration)Import of getMyselfTool from './getMyself.js'.
import { getMyselfTool } from './getMyself.js';