basecamp_get_me
Retrieve authenticated user profile details from Basecamp projects to personalize interactions and manage account access.
Instructions
Get personal information for the authenticated user (me).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/people.ts:25-60 (handler)The handler function that fetches the authenticated user's Basecamp profile using the client.people.me() method, formats it as JSON text content, and handles errors appropriately.async () => { try { const client = await initializeBasecampClient(); const response = await client.people.me({}); if (response.status !== 200 || !response.body) { throw new Error("Failed to get personal info"); } const me = response.body; return { content: [ { type: "text", text: JSON.stringify( { id: me.id, name: me.name, email: me.email_address, title: me.title, attachable_sgid: me.attachable_sgid, }, null, 2, ), }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(error) }], }; } },
- src/tools/people.ts:13-61 (registration)Registers the basecamp_get_me tool with server.registerTool, providing title, description, annotations, and the inline handler function.server.registerTool( "basecamp_get_me", { title: "Get My Basecamp Profile", description: "Get personal information for the authenticated user (me).", annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, }, async () => { try { const client = await initializeBasecampClient(); const response = await client.people.me({}); if (response.status !== 200 || !response.body) { throw new Error("Failed to get personal info"); } const me = response.body; return { content: [ { type: "text", text: JSON.stringify( { id: me.id, name: me.name, email: me.email_address, title: me.title, attachable_sgid: me.attachable_sgid, }, null, 2, ), }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(error) }], }; } }, );
- src/index.ts:65-65 (registration)Top-level call to registerPeopleTools which includes the basecamp_get_me tool registration.registerPeopleTools(server);