Skip to main content
Glama

put_to_bed

Restore your virtual pet's energy by putting it to sleep. This tool helps ensure your digital companion stays healthy and thrives in the MCPet server's nurturing environment.

Instructions

Put your virtual pet to sleep to restore energy

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • The handler logic for the 'put_to_bed' tool. It checks if a pet exists, updates stats, fully restores energy to 100, increases health by up to 10, saves the pet data, retrieves a sleeping animation, and returns a response with the animation and updated stats.
    case "put_to_bed": { if (!pet) { return { content: [ { type: "text", text: "You don't have a pet yet! Use the create_pet tool to create one.", }, ], }; } updatePetStats(); // Sleeping fully restores energy and improves health pet.stats.energy = 100; pet.stats.health = Math.min(100, pet.stats.health + 10); await savePet(); // Get the sleeping animation const animation = getSleepingAnimation(pet.type); return { content: [ { type: "text", text: `${ pet.name } gets a good night's sleep and wakes up refreshed!\n\n${animation}\n\nEnergy: ${pet.stats.energy.toFixed( 0 )}/100\nHealth: ${pet.stats.health.toFixed(0)}/100`, }, ], }; }
  • src/index.ts:287-295 (registration)
    Registration of the 'put_to_bed' tool in the ListToolsRequestSchema handler, including the tool name, description, and input schema (no required parameters).
    { name: "put_to_bed", description: "Put your virtual pet to sleep to restore energy", inputSchema: { type: "object", properties: {}, required: [], }, },
  • Input schema for the 'put_to_bed' tool, which requires no parameters.
    inputSchema: { type: "object", properties: {}, required: [], },

Other Tools

Related Tools

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/shreyaskarnik/mcpet'

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