Skip to main content
Glama
nickweedon

Skeleton MCP Server

by nickweedon

get_item

Retrieve specific item data using its unique identifier. This tool fetches item information when you provide the item ID, returning the data if the item exists.

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

NameRequiredDescriptionDefault
item_idYes

Input Schema (JSON Schema)

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

Implementation Reference

  • The main handler function for the 'get_item' tool, which retrieves a specific item by ID from mock data, raising ValueError if not found.
    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]
  • Registration of the 'get_item' tool using the FastMCP decorator mcp.tool() on the imported example.get_item function.
    mcp.tool()(example.get_item)

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/nickweedon/playwritght-proxy-mcp'

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