fix(mcp) : typer les éléments des params tableaux d'IDs (items: integer)
Auto Tag Develop / tag (push) Successful in 11s
Auto Tag Develop / tag (push) Successful in 11s
Les params tableaux (tagIds, collaboratorIds) des tools create-task,
update-task, list-tasks, create-time-entry et update-time-entry
généraient un schéma { type: [array, null] } sans clé items : aucune
contrainte sur le type des éléments, d'où des IDs pouvant transiter en
string. Ajout d'un docblock @param int[] sur chaque __invoke pour que le
SchemaGenerator du SDK MCP produise items: { type: integer }, ce qui
force la validation à n'accepter que des entiers.
This commit is contained in:
@@ -41,6 +41,10 @@ class CreateTaskTool
|
||||
private readonly CalDavService $calDavService,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param int[] $tagIds IDs of the tags to attach
|
||||
* @param int[] $collaboratorIds IDs of the collaborators to attach
|
||||
*/
|
||||
public function __invoke(
|
||||
int $projectId,
|
||||
string $title,
|
||||
|
||||
@@ -18,6 +18,9 @@ class ListTasksTool
|
||||
private readonly Security $security,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param int[] $tagIds IDs of the tags to filter by
|
||||
*/
|
||||
public function __invoke(
|
||||
?int $projectId = null,
|
||||
?int $statusId = null,
|
||||
|
||||
@@ -38,6 +38,10 @@ class UpdateTaskTool
|
||||
private readonly CalDavService $calDavService,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param int[] $tagIds IDs of the tags to attach
|
||||
* @param int[] $collaboratorIds IDs of the collaborators to attach
|
||||
*/
|
||||
public function __invoke(
|
||||
int $id,
|
||||
?string $title = null,
|
||||
|
||||
@@ -33,6 +33,9 @@ class CreateTimeEntryTool
|
||||
private readonly Security $security,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param int[] $tagIds IDs of the tags to attach
|
||||
*/
|
||||
public function __invoke(
|
||||
int $userId,
|
||||
string $startedAt,
|
||||
|
||||
@@ -30,6 +30,9 @@ class UpdateTimeEntryTool
|
||||
private readonly Security $security,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param int[] $tagIds IDs of the tags to attach
|
||||
*/
|
||||
public function __invoke(
|
||||
int $id,
|
||||
?string $title = null,
|
||||
|
||||
Reference in New Issue
Block a user