diff --git a/src/repos.ts b/src/repos.ts index c9ca187..db54ccf 100644 --- a/src/repos.ts +++ b/src/repos.ts @@ -151,7 +151,7 @@ const RepositoryTag = z.object({ .array( z.object({ architecture: z.string().describe('The architecture of the tag'), - features: z.string().describe('The features of the tag'), + features: z.string().nullable().describe('The features of the tag'), variant: z.string().optional().nullable().describe('The variant of the tag'), digest: z.string().nullable().describe('image layer digest'), layers: z @@ -421,6 +421,12 @@ export class Repos extends Asset { .describe( 'The operating system to list tags from. If not provided, all operating systems will be listed.' ), + name: z + .string() + .optional() + .describe( + 'Filter tags by name substring. Useful for resolving a partial git SHA (e.g. a short commit hash) to a full tag.' + ), }).shape, outputSchema: repositoryTagPaginatedResponseSchema.shape, annotations: { @@ -526,6 +532,7 @@ export class Repos extends Asset { page_size, architecture, os, + name, }: { repository: string; namespace?: string; @@ -533,6 +540,7 @@ export class Repos extends Asset { page_size?: number; architecture?: string; os?: string; + name?: string; }): Promise { if (!namespace) { namespace = 'library'; @@ -554,6 +562,9 @@ export class Repos extends Asset { if (os) { params.os = os; } + if (name) { + params.name = name; + } if (Object.keys(params).length > 0) { url += `?${new URLSearchParams(params).toString()}`; } diff --git a/tools.json b/tools.json index fe2c199..a348380 100644 --- a/tools.json +++ b/tools.json @@ -2326,6 +2326,10 @@ "os": { "type": "string", "description": "The operating system to list tags from. If not provided, all operating systems will be listed." + }, + "name": { + "type": "string", + "description": "Filter tags by name substring. Useful for resolving a partial git SHA (e.g. a short commit hash) to a full tag." } }, "required": ["repository"], @@ -2408,7 +2412,10 @@ "description": "The architecture of the tag" }, "features": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The features of the tag" }, "variant": { @@ -2906,7 +2913,7 @@ "description": "The architecture of the tag" }, "features": { - "type": "string", + "type": ["string", "null"], "description": "The features of the tag" }, "variant": {