get-my-handle-and-did
Retrieve the handle and DID (Decentralized Identifier) of the currently authenticated user on Bluesky. This tool supports user queries related to their own profile, such as 'me' or 'my' interactions.
Instructions
Return the handle and did of the currently authenticated user for this blusesky session. Useful for when someone asks information about themselves using "me" or "my" on bluesky.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:100-110 (registration)Registration of the 'get-my-handle-and-did' tool using server.tool(), including inline handler function that returns the authenticated user's handle and DID from the global agent session.server.tool( 'get-my-handle-and-did', 'Return the handle and did of the currently authenticated user for this blusesky session. Useful for when someone asks information about themselves using "me" or "my" on bluesky.', {}, async () => { if (!agent) { return mcpErrorResponse("Not connected to Bluesky. Check your environment variables."); } return mcpSuccessResponse(`Your handle is: ${agent?.session?.handle}\nYour did is: ${agent?.session?.did}`); } );
- src/index.ts:104-109 (handler)The handler function for the tool, which checks if agent is connected and returns a success response with the user's handle and DID from agent.session.async () => { if (!agent) { return mcpErrorResponse("Not connected to Bluesky. Check your environment variables."); } return mcpSuccessResponse(`Your handle is: ${agent?.session?.handle}\nYour did is: ${agent?.session?.did}`); }