Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -526,13 +532,15 @@ export class Repos extends Asset {
page_size,
architecture,
os,
name,
}: {
repository: string;
namespace?: string;
page?: number;
page_size?: number;
architecture?: string;
os?: string;
name?: string;
}): Promise<CallToolResult> {
if (!namespace) {
namespace = 'library';
Expand All @@ -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()}`;
}
Expand Down
11 changes: 9 additions & 2 deletions tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down Expand Up @@ -2408,7 +2412,10 @@
"description": "The architecture of the tag"
},
"features": {
"type": "string",
"type": [
"string",
"null"
],
"description": "The features of the tag"
},
"variant": {
Expand Down Expand Up @@ -2906,7 +2913,7 @@
"description": "The architecture of the tag"
},
"features": {
"type": "string",
"type": ["string", "null"],
"description": "The features of the tag"
},
"variant": {
Expand Down