Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| daeb95f3c3 | |||
| 36d44d1781 | |||
| 949fb7124b |
@@ -1,3 +1,9 @@
|
|||||||
|
## v0.8.2 (2025-08-31)
|
||||||
|
|
||||||
|
### Fix
|
||||||
|
|
||||||
|
- **notes**: Remove note contents from responses to reduce token usage
|
||||||
|
|
||||||
## v0.8.1 (2025-08-30)
|
## v0.8.1 (2025-08-30)
|
||||||
|
|
||||||
### Fix
|
### Fix
|
||||||
|
|||||||
@@ -48,13 +48,16 @@ class NotesSettings(BaseModel):
|
|||||||
class CreateNoteResponse(IdResponse):
|
class CreateNoteResponse(IdResponse):
|
||||||
"""Response model for note creation."""
|
"""Response model for note creation."""
|
||||||
|
|
||||||
note: Note = Field(description="The created note")
|
title: str = Field(description="The created note title")
|
||||||
|
category: str = Field(description="The created note category")
|
||||||
|
|
||||||
|
|
||||||
class UpdateNoteResponse(BaseResponse):
|
class UpdateNoteResponse(BaseResponse):
|
||||||
"""Response model for note updates."""
|
"""Response model for note updates."""
|
||||||
|
|
||||||
note: Note = Field(description="The updated note")
|
id: int = Field(description="The updated note ID")
|
||||||
|
title: str = Field(description="The updated note title")
|
||||||
|
category: str = Field(description="The updated note category")
|
||||||
|
|
||||||
|
|
||||||
class DeleteNoteResponse(StatusResponse):
|
class DeleteNoteResponse(StatusResponse):
|
||||||
@@ -66,7 +69,9 @@ class DeleteNoteResponse(StatusResponse):
|
|||||||
class AppendContentResponse(BaseResponse):
|
class AppendContentResponse(BaseResponse):
|
||||||
"""Response model for appending content to a note."""
|
"""Response model for appending content to a note."""
|
||||||
|
|
||||||
note: Note = Field(description="The updated note after appending content")
|
id: int = Field(description="The updated note ID")
|
||||||
|
title: str = Field(description="The updated note title")
|
||||||
|
category: str = Field(description="The updated note category")
|
||||||
|
|
||||||
|
|
||||||
class SearchNotesResponse(BaseResponse):
|
class SearchNotesResponse(BaseResponse):
|
||||||
|
|||||||
@@ -90,7 +90,9 @@ def configure_notes_tools(mcp: FastMCP):
|
|||||||
category=category,
|
category=category,
|
||||||
)
|
)
|
||||||
note = Note(**note_data)
|
note = Note(**note_data)
|
||||||
return CreateNoteResponse(id=note.id, note=note)
|
return CreateNoteResponse(
|
||||||
|
id=note.id, title=note.title, category=note.category
|
||||||
|
)
|
||||||
except HTTPStatusError as e:
|
except HTTPStatusError as e:
|
||||||
if e.response.status_code == 403:
|
if e.response.status_code == 403:
|
||||||
return ErrorResponse(
|
return ErrorResponse(
|
||||||
@@ -128,7 +130,9 @@ def configure_notes_tools(mcp: FastMCP):
|
|||||||
category=category,
|
category=category,
|
||||||
)
|
)
|
||||||
note = Note(**note_data)
|
note = Note(**note_data)
|
||||||
return UpdateNoteResponse(note=note)
|
return UpdateNoteResponse(
|
||||||
|
id=note.id, title=note.title, category=note.category
|
||||||
|
)
|
||||||
except HTTPStatusError as e:
|
except HTTPStatusError as e:
|
||||||
if e.response.status_code == 404:
|
if e.response.status_code == 404:
|
||||||
return ErrorResponse(error=f"Note {note_id} not found")
|
return ErrorResponse(error=f"Note {note_id} not found")
|
||||||
@@ -151,7 +155,7 @@ def configure_notes_tools(mcp: FastMCP):
|
|||||||
async def nc_notes_append_content(
|
async def nc_notes_append_content(
|
||||||
note_id: int, content: str, ctx: Context
|
note_id: int, content: str, ctx: Context
|
||||||
) -> AppendContentResponse | ErrorResponse:
|
) -> AppendContentResponse | ErrorResponse:
|
||||||
"""Append content to an existing note with a clear separator"""
|
"""Append content to an existing note with a clear separator. The tool automatically adds separators between existing and new content - do not include separators in your content."""
|
||||||
logger.info("Appending content to note %s", note_id)
|
logger.info("Appending content to note %s", note_id)
|
||||||
client: NextcloudClient = ctx.request_context.lifespan_context.client
|
client: NextcloudClient = ctx.request_context.lifespan_context.client
|
||||||
try:
|
try:
|
||||||
@@ -159,7 +163,9 @@ def configure_notes_tools(mcp: FastMCP):
|
|||||||
note_id=note_id, content=content
|
note_id=note_id, content=content
|
||||||
)
|
)
|
||||||
note = Note(**note_data)
|
note = Note(**note_data)
|
||||||
return AppendContentResponse(note=note)
|
return AppendContentResponse(
|
||||||
|
id=note.id, title=note.title, category=note.category
|
||||||
|
)
|
||||||
except HTTPStatusError as e:
|
except HTTPStatusError as e:
|
||||||
if e.response.status_code == 404:
|
if e.response.status_code == 404:
|
||||||
return ErrorResponse(error=f"Note {note_id} not found")
|
return ErrorResponse(error=f"Note {note_id} not found")
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "nextcloud-mcp-server"
|
name = "nextcloud-mcp-server"
|
||||||
version = "0.8.1"
|
version = "0.8.2"
|
||||||
description = ""
|
description = ""
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Chris Coutinho",email = "chris@coutinho.io"}
|
{name = "Chris Coutinho",email = "chris@coutinho.io"}
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nextcloud-mcp-server"
|
name = "nextcloud-mcp-server"
|
||||||
version = "0.8.1"
|
version = "0.8.2"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "httpx" },
|
{ name = "httpx" },
|
||||||
|
|||||||
Reference in New Issue
Block a user