From f4bcfdfcd413f7c12be0ff0f5431b78ab686d7b3 Mon Sep 17 00:00:00 2001 From: Eduard Lupacescu Date: Wed, 3 Sep 2025 12:45:37 +0300 Subject: [PATCH 1/2] fix: fixing the docs for relationship show on mcp --- src/MCP/Concerns/McpShowTool.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MCP/Concerns/McpShowTool.php b/src/MCP/Concerns/McpShowTool.php index 5ef58630e..686ab53dd 100644 --- a/src/MCP/Concerns/McpShowTool.php +++ b/src/MCP/Concerns/McpShowTool.php @@ -21,7 +21,7 @@ public function showTool(array $arguments, McpShowRequest $request): array $query = static::query($request); // Apply showQuery and mainQuery with proper relationship loading - $model = tap($query, fn ($query) => static::showQuery( + $model = tap($query, fn($query) => static::showQuery( $request, static::mainQuery($request, $query->with(static::collectWiths( $request, $this @@ -45,6 +45,6 @@ public static function showToolSchema(ToolInputSchema $schema): void ->required(); $schema->string('include') - ->description(static::formatRelationshipDocumentation()); + ->description(static::formatRelationshipDocumentation(app(McpShowRequest::class))); } } From 529529a73daa2d7646d0453ba780fa2c26a81447 Mon Sep 17 00:00:00 2001 From: binaryk Date: Wed, 3 Sep 2025 09:46:04 +0000 Subject: [PATCH 2/2] Fix styling --- src/MCP/Concerns/McpShowTool.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MCP/Concerns/McpShowTool.php b/src/MCP/Concerns/McpShowTool.php index 686ab53dd..8115fa1d3 100644 --- a/src/MCP/Concerns/McpShowTool.php +++ b/src/MCP/Concerns/McpShowTool.php @@ -21,7 +21,7 @@ public function showTool(array $arguments, McpShowRequest $request): array $query = static::query($request); // Apply showQuery and mainQuery with proper relationship loading - $model = tap($query, fn($query) => static::showQuery( + $model = tap($query, fn ($query) => static::showQuery( $request, static::mainQuery($request, $query->with(static::collectWiths( $request, $this