mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-10 22:32:16 +02:00
Rename the import package surfsense_mcp -> mcp_server and remove the src/ layer so the project mirrors the backend's shape (project folder != package name, e.g. surfsense_backend/app). Kills the redundant surfsense_mcp/src/surfsense_mcp nesting. Distribution name and console command (surfsense-mcp) are unchanged; only python -m and internal import paths move to mcp_server. Dockerfile CMD updated; no PYTHONPATH added since the editable install already makes the package importable.
34 lines
937 B
Python
34 lines
937 B
Python
"""Tool-call policy hints and shared parameter types for knowledge-base tools."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Annotated
|
|
|
|
from mcp.types import ToolAnnotations
|
|
from pydantic import Field
|
|
|
|
READ = ToolAnnotations(
|
|
readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False
|
|
)
|
|
WRITE = ToolAnnotations(
|
|
readOnlyHint=False, destructiveHint=False, idempotentHint=False, openWorldHint=False
|
|
)
|
|
DELETE = ToolAnnotations(
|
|
readOnlyHint=False, destructiveHint=True, idempotentHint=False, openWorldHint=False
|
|
)
|
|
|
|
DocumentId = Annotated[
|
|
int,
|
|
Field(
|
|
description="Document id from surfsense_search_knowledge_base or "
|
|
"surfsense_list_documents results."
|
|
),
|
|
]
|
|
|
|
DocumentTypes = Annotated[
|
|
list[str] | None,
|
|
Field(
|
|
description="Restrict to these document types, e.g. "
|
|
"['FILE', 'CRAWLED_URL', 'YOUTUBE_VIDEO']. Omit for all types."
|
|
),
|
|
]
|