get_item
Retrieve specific item data by providing its unique identifier. Use this tool to fetch detailed information about any item stored in the system when you have the item ID.
Instructions
Get a specific item by ID.
Args: item_id: The unique identifier of the item
Returns: The item data if found
Raises: ValueError: If the item is not found
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes |
Implementation Reference
- src/skeleton_mcp/api/example.py:81-101 (handler)Implementation of the get_item tool handler. Retrieves a specific item by its ID from the MOCK_ITEMS dictionary, raises ValueError if not found. Includes type hints and comprehensive docstring describing input/output.async def get_item(item_id: str) -> dict[str, Any]: """ Get a specific item by ID. Args: item_id: The unique identifier of the item Returns: The item data if found Raises: ValueError: If the item is not found """ # In a real implementation: # client = get_client() # return client.get(f"items/{item_id}") if item_id not in MOCK_ITEMS: raise ValueError(f"Item not found: {item_id}") return MOCK_ITEMS[item_id]
- src/skeleton_mcp/server.py:90-90 (registration)Registration of the get_item tool using the FastMCP mcp.tool() decorator, making it available to MCP clients.mcp.tool()(example.get_item)