66use Binaryk \LaravelRestify \Filters \MatchesCollection ;
77use Binaryk \LaravelRestify \Filters \MatchFilter ;
88use Binaryk \LaravelRestify \Filters \SearchablesCollection ;
9+ use Binaryk \LaravelRestify \MCP \Requests \McpIndexRequest ;
910use Binaryk \LaravelRestify \MCP \Requests \McpRequest ;
1011use Laravel \Mcp \Server \Tools \ToolInputSchema ;
1112
1415 */
1516trait McpIndexTool
1617{
17- public function indexTool (array $ arguments , McpRequest $ request ): array
18+ public function indexTool (array $ arguments , McpIndexRequest $ request ): array
1819 {
1920 $ request ->merge ($ arguments );
2021 $ this ->sanitizeToolRequest ($ request , $ arguments );
@@ -33,7 +34,7 @@ public static function indexToolSchema(ToolInputSchema $schema): void
3334 ->description ("Number of $ key per page " );
3435
3536 $ schema ->string ('include ' )
36- ->description (static ::formatRelationshipDocumentation ());
37+ ->description (static ::formatRelationshipDocumentation (app (McpIndexRequest::class) ));
3738
3839 $ searchableFields = (new SearchablesCollection (static ::searchables ()))->formatForDocumentation ();
3940
@@ -66,11 +67,11 @@ public static function indexToolSchema(ToolInputSchema $schema): void
6667
6768 return match ($ matchFilter ->getType ()) {
6869 RestifySearchable::MATCH_INTEGER , 'integer ' => $ schema ->integer ($ filterKey )
69- ->description ("Filter $ key resource. Filter scription : " .$ matchFilter ->description ()),
70+ ->description ("Filter $ key resource. Description : " .$ matchFilter ->description ()),
7071 RestifySearchable::MATCH_BOOL , 'boolean ' => $ schema ->boolean ($ filterKey )
71- ->description ("Filter $ key resource. Filter scription : " .$ matchFilter ->description ()),
72+ ->description ("Filter $ key resource. Description : " .$ matchFilter ->description ()),
7273 default => $ schema ->string ($ filterKey )
73- ->description ("Filter $ key resource. Filter scription : " .$ matchFilter ->description ())
74+ ->description ("Filter $ key resource. Description : " .$ matchFilter ->description ())
7475 };
7576 });
7677 }
0 commit comments