mailosaur_servers_update
Update a Mailosaur server's name by specifying its server ID and the desired new name.
Instructions
Update a Mailosaur server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Server ID. | |
| name | Yes |
Implementation Reference
- src/index.ts:305-308 (handler)The handler function for the mailosaur_servers_update tool. It takes 'id' and 'name' parameters, calls mailosaur.servers.update(), and returns the result via the response helper.
async ({ id, name }) => { const result = await mailosaur.servers.update(id, { name }); return response(result); } - src/index.ts:301-304 (schema)Zod schema defining the input parameters: 'id' (string, server ID) and 'name' (string) for the mailosaur_servers_update tool.
{ id: z.string().describe("Server ID."), name: z.string() }, - src/index.ts:298-309 (registration)Registration of the 'mailosaur_servers_update' tool with the MCP server, including name, description, schema, and handler.
server.tool( "mailosaur_servers_update", "Update a Mailosaur server.", { id: z.string().describe("Server ID."), name: z.string() }, async ({ id, name }) => { const result = await mailosaur.servers.update(id, { name }); return response(result); } ); - src/index.ts:79-88 (helper)Helper function that wraps a value into the MCP response format with a text content block containing JSON-stringified output.
function response(value: unknown) { return { content: [ { type: "text" as const, text: JSON.stringify(value, null, 2) } ] }; }