Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

update-profile

Modify user profile details such as name and email on Terminal.shop MCP Server. Ensure accurate and up-to-date information for account management and personalized interactions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailNo
nameNo

Implementation Reference

  • The asynchronous handler function that executes the update-profile tool. It conditionally updates the user's name and/or email by making a PUT request to the /profile endpoint using terminalApi, then returns success or error messages.
    async ({ name, email }) => { try { // Only include fields that are provided const updateData = {}; if (name !== undefined) updateData.name = name; if (email !== undefined) updateData.email = email; const response = await terminalApi.put("/profile", updateData); const profile = response.data.data; return { content: [ { type: "text", text: `Profile updated successfully:\nName: ${profile.user.name}\nEmail: ${profile.user.email}`, }, ], }; } catch (error) { console.error("Error updating profile:", error); return { content: [ { type: "text", text: `Error updating profile: ${error.message}`, }, ], isError: true, }; } },
  • Zod schema defining the input parameters for the update-profile tool: optional 'name' string and optional 'email' string (validated as email).
    { name: z.string().optional(), email: z.string().email().optional(), },
  • server.js:817-854 (registration)
    The server.tool() call that registers the 'update-profile' tool, specifying its name, input schema, and handler function.
    server.tool( "update-profile", { name: z.string().optional(), email: z.string().email().optional(), }, async ({ name, email }) => { try { // Only include fields that are provided const updateData = {}; if (name !== undefined) updateData.name = name; if (email !== undefined) updateData.email = email; const response = await terminalApi.put("/profile", updateData); const profile = response.data.data; return { content: [ { type: "text", text: `Profile updated successfully:\nName: ${profile.user.name}\nEmail: ${profile.user.email}`, }, ], }; } catch (error) { console.error("Error updating profile:", error); return { content: [ { type: "text", text: `Error updating profile: ${error.message}`, }, ], isError: true, }; } }, );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pashaydev/terminal.shop.mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server