diff --git a/python/packages/core/agent_framework/_skills.py b/python/packages/core/agent_framework/_skills.py index ba550e7095..6268c00879 100644 --- a/python/packages/core/agent_framework/_skills.py +++ b/python/packages/core/agent_framework/_skills.py @@ -651,9 +651,7 @@ def _validate_compatibility(compatibility: str | None) -> None: ValueError: If the value exceeds the maximum allowed length. """ if compatibility is not None and len(compatibility) > MAX_COMPATIBILITY_LENGTH: - raise ValueError( - f"Skill compatibility must be {MAX_COMPATIBILITY_LENGTH} characters or fewer." - ) + raise ValueError(f"Skill compatibility must be {MAX_COMPATIBILITY_LENGTH} characters or fewer.") def _build_skill_content( @@ -733,6 +731,7 @@ class InlineSkill(Skill): instructions="Use this skill for DB tasks.", ) + @skill.resource def get_schema() -> str: return "CREATE TABLE ..." @@ -2613,11 +2612,7 @@ class FileSkillsSource(SkillsSource): # Reject absolute paths (check both POSIX and Windows-style roots # so validation is consistent regardless of the host OS) - if ( - os.path.isabs(directory) - or normalized.startswith("/") - or re.match(r"^[A-Za-z]:[/\\]", directory) - ): + if os.path.isabs(directory) or normalized.startswith("/") or re.match(r"^[A-Za-z]:[/\\]", directory): logger.warning( "Skipping directory '%s': absolute paths are not allowed.", directory, diff --git a/python/packages/core/tests/core/test_mcp.py b/python/packages/core/tests/core/test_mcp.py index 0fc5867d79..aea479ff86 100644 --- a/python/packages/core/tests/core/test_mcp.py +++ b/python/packages/core/tests/core/test_mcp.py @@ -4227,9 +4227,7 @@ async def test_mcp_tool_call_tool_forwards_tool_list_meta(): self.session.call_tool = AsyncMock( return_value=types.CallToolResult(content=[types.TextContent(type="text", text="result")]) ) - self.session.list_prompts = AsyncMock( - return_value=types.ListPromptsResult(prompts=[]) - ) + self.session.list_prompts = AsyncMock(return_value=types.ListPromptsResult(prompts=[])) def get_mcp_client(self) -> _AsyncGeneratorContextManager[Any, None]: return None