Add File
Add files or websites from URLs to Hyperspell for connecting AI applications to unstructured and semi-structured data.
Instructions
Add a file or website from a URL to Hyperspell.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "Add File"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- src/hyperspell_mcp/server.py:135-138 (handler)The handler function `add_file` that executes the tool logic: adds a file or URL to Hyperspell via API and returns DocumentStatus.
def add_file(url: str) -> DocumentStatus: """Add a file or URL to Hyperspell.""" r = mcp.api.documents.add_url(url=url, collection=mcp.config.collection) return DocumentStatus.from_pydantic(r) - src/hyperspell_mcp/server.py:132-134 (registration)Registration of the "Add File" tool using the @mcp.tool decorator.
@mcp.tool( name="Add File", description="Add a file or website from a URL to Hyperspell." ) - src/hyperspell_mcp/types.py:46-50 (schema)Pydantic-compatible dataclass schema for the output type DocumentStatus used by the tool.
class DocumentStatus(BaseModel): id: int status: str collection: str