mcp: fix Gemini register_version schema + optional types (#562)

* mcp: fix Gemini register_version schema and optional types\n\n- Constrain  to JSON-serializable dict | list[dict] for create_version\n- Use  for optional args in RAG tools\n- Add AGENTS.md with repo guidelines

* mcp: remove unintended AGENTS.md from PR

---------

Co-authored-by: Cole Medin <cole@dynamous.ai>
This commit is contained in:
Ricardo León 2025-09-06 12:57:27 -06:00 committed by GitHub
parent 9417156297
commit 52ee5e2c2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ def register_version_tools(mcp: FastMCP):
ctx: Context, ctx: Context,
project_id: str, project_id: str,
field_name: str, field_name: str,
content: Any, content: dict[str, Any] | list[dict[str, Any]],
change_summary: str | None = None, change_summary: str | None = None,
document_id: str | None = None, document_id: str | None = None,
created_by: str = "system", created_by: str = "system",

View File

@ -78,7 +78,7 @@ def register_rag_tools(mcp: FastMCP):
@mcp.tool() @mcp.tool()
async def perform_rag_query( async def perform_rag_query(
ctx: Context, query: str, source_domain: str = None, match_count: int = 5 ctx: Context, query: str, source_domain: str | None = None, match_count: int = 5
) -> str: ) -> str:
""" """
Search knowledge base for relevant content using RAG. Search knowledge base for relevant content using RAG.
@ -135,7 +135,7 @@ def register_rag_tools(mcp: FastMCP):
@mcp.tool() @mcp.tool()
async def search_code_examples( async def search_code_examples(
ctx: Context, query: str, source_domain: str = None, match_count: int = 5 ctx: Context, query: str, source_domain: str | None = None, match_count: int = 5
) -> str: ) -> str:
""" """
Search for relevant code examples in the knowledge base. Search for relevant code examples in the knowledge base.