Skip to main content
Glama

get_collection_details

Retrieve detailed information about a specific collection using its slug to access metadata and contents.

Instructions

Get detailed information about a specific collection.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collection_slugYes

Implementation Reference

  • The main handler function that executes the tool: fetches collection details from Replicate API using ReplicateClient and returns a parsed Collection object.
    async def get_collection_details(collection_slug: str) -> Collection: """Get detailed information about a specific collection.""" async with ReplicateClient(api_token=os.getenv("REPLICATE_API_TOKEN")) as client: result = await client.get_collection(collection_slug) return Collection(**result)
  • Registers the get_collection_details tool on the FastMCP server instance using the @mcp.tool() decorator.
    @mcp.tool()
  • Pydantic BaseModel used for input/output typing and validation of the Collection object returned by the tool.
    class Collection(BaseModel): """A collection of related models on Replicate.""" name: str = Field(..., description="Name of the collection") slug: str = Field(..., description="URL-friendly identifier for the collection") description: Optional[str] = Field(None, description="Description of the collection's purpose") models: List[Model] = Field(default_factory=list, description="Models in this collection")

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/gerred/mcp-server-replicate'

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