Skip to main content
Glama
pashaydev

Terminal.shop MCP Server

by pashaydev

delete-token

Removes a specified token to manage API access and security for Terminal.shop interactions. Use to invalidate unused or compromised tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenIdYes

Implementation Reference

  • The handler function for the "delete-token" tool. It takes a tokenId, calls the terminalApi to delete the token at `/token/${tokenId}`, and returns an MCP-formatted response with success or error message.
    async ({ tokenId }) => { try { await terminalApi.delete(`/token/${tokenId}`); return { content: [ { type: "text", text: `Token deleted successfully`, }, ], }; } catch (error) { console.error(`Error deleting token ${tokenId}:`, error); return { content: [ { type: "text", text: `Error deleting token: ${error.message}`, }, ], isError: true, }; } },
  • Input schema for the "delete-token" tool, defining 'tokenId' as a required string using Zod validation.
    { tokenId: z.string(), },
  • server.js:1134-1162 (registration)
    Registration of the "delete-token" tool using server.tool(name, schema, handler), which registers it with the MCP server.
    "delete-token", { tokenId: z.string(), }, async ({ tokenId }) => { try { await terminalApi.delete(`/token/${tokenId}`); return { content: [ { type: "text", text: `Token deleted successfully`, }, ], }; } catch (error) { console.error(`Error deleting token ${tokenId}:`, error); return { content: [ { type: "text", text: `Error deleting token: ${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