qdrant-store
Store information in Qdrant vector collections with metadata for later retrieval, enabling persistent memory storage in MCP applications.
Instructions
Keep the memory for later use, when you are asked to remember something.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| information | Yes | Text to store | |
| collection_name | Yes | The collection to store the information in | |
| metadata | No | Extra metadata stored along with memorised information. Any json is accepted. |
Implementation Reference
- The main handler function for the "qdrant-store" MCP tool. It defines the input schema via Annotated Fields, processes the information and metadata into an Entry, stores it using the QdrantConnector, and returns a confirmation message.async def store( ctx: Context, information: Annotated[str, Field(description="Text to store")], collection_name: Annotated[ str, Field(description="The collection to store the information in") ], # The `metadata` parameter is defined as non-optional, but it can be None. # If we set it to be optional, some of the MCP clients, like Cursor, cannot # handle the optional parameter correctly. metadata: Annotated[ Metadata | None, Field( description="Extra metadata stored along with memorised information. Any json is accepted." ), ] = None, ) -> str: """ Store some information in Qdrant. :param ctx: The context for the request. :param information: The information to store. :param metadata: JSON metadata to store with the information, optional. :param collection_name: The name of the collection to store the information in, optional. If not provided, the default collection is used. :return: A message indicating that the information was stored. """ await ctx.debug(f"Storing information {information} in Qdrant") entry = Entry(content=information, metadata=metadata) await self.qdrant_connector.store(entry, collection_name=collection_name) if collection_name: return f"Remembered: {information} in collection {collection_name}" return f"Remembered: {information}"
- src/mcp_server_qdrant/mcp_server.py:195-199 (registration)Registers the store_foo function (alias and possible wrapper of the store handler) as the MCP tool named "qdrant-store" in the FastMCP server, conditional on read_only being false.self.tool( store_foo, name="qdrant-store", description=self.tool_settings.tool_store_description, )