send-message
Send a message to Claude via the Claude Desktop API MCP to access advanced features and bypass Professional Plan limitations, enabling direct interaction and conversation management.
Instructions
Send a message to Claude
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Message to send to Claude |
Implementation Reference
- src/index.ts:51-78 (handler)The handler logic for the "send-message" tool. It validates the tool name and message argument, calls the Anthropic Claude API to create a message with the user input, extracts the text response, and returns it in the expected format. Errors are logged and rethrown.if (request.params.name === "send-message" && request.params.arguments?.message) { try { const msg = await client.messages.create({ model: "claude-3-opus-20240229", max_tokens: 1024, messages: [ { role: "user", content: String(request.params.arguments.message) } ] }); const responseText = msg.content[0].type === 'text' ? msg.content[0].text : 'No text response available'; return { content: [ { type: "text", text: responseText } ] }; } catch (error) { log(`Error calling Claude API: ${error}`); throw error; } }
- src/index.ts:33-42 (schema)Input schema definition for the "send-message" tool, specifying an object with a required 'message' property of type string.inputSchema: { type: "object", properties: { message: { type: "string", description: "Message to send to Claude" } }, required: ["message"] }
- src/index.ts:30-44 (registration)Registration of the "send-message" tool in the ListTools response, including name, description, and input schema.{ name: "send-message", description: "Send a message to Claude", inputSchema: { type: "object", properties: { message: { type: "string", description: "Message to send to Claude" } }, required: ["message"] } } ]