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
4 changes: 4 additions & 0 deletions src/accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class Accounts extends Asset {
}

RegisterTools(): void {
// Fork note: these namespace lookups are read-only and should stay marked as such.
this.tools.set(
'listNamespaces',
this.server.registerTool(
Expand All @@ -75,6 +76,7 @@ export class Accounts extends Asset {
outputSchema: namespacePaginatedResponseSchema.shape,
annotations: {
title: 'List Namespaces',
readOnlyHint: true,
},
title: 'List organisations (namespaces) the user has access to',
},
Expand All @@ -89,6 +91,7 @@ export class Accounts extends Asset {
description: 'Get the personal namespace name',
annotations: {
title: 'Get Personal Namespace',
readOnlyHint: true,
},
title: 'Get user personal namespace',
},
Expand All @@ -103,6 +106,7 @@ export class Accounts extends Asset {
description: 'List all namespaces the user is a member of',
annotations: {
title: 'List All Namespaces user is a member of',
readOnlyHint: true,
},
title: 'List all organisations (namespaces) the user is a member of including personal namespace',
},
Expand Down
7 changes: 7 additions & 0 deletions src/repos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ export class Repos extends Asset {
}

RegisterTools(): void {
// Fork note: non-mutating repository and tag operations must keep readOnlyHint=true.
// List Repositories by Namespace
this.tools.set(
'listRepositoriesByNamespace',
Expand Down Expand Up @@ -279,6 +280,7 @@ export class Repos extends Asset {
outputSchema: repositoryPaginatedResponseSchema.shape,
annotations: {
title: 'List Repositories by Namespace',
readOnlyHint: true,
},
title: 'List Repositories by Organisation (namespace)',
},
Expand Down Expand Up @@ -321,6 +323,7 @@ export class Repos extends Asset {
outputSchema: Repository.shape,
annotations: {
title: 'Get Repository Info',
readOnlyHint: true,
},
title: 'Get Repository Details',
},
Expand Down Expand Up @@ -382,6 +385,7 @@ export class Repos extends Asset {
inputSchema: z.object({ namespace: z.string(), repository: z.string() }).shape,
annotations: {
title: 'Check Repository Exists',
readOnlyHint: true,
},
title: 'Check Repository Exists',
},
Expand Down Expand Up @@ -425,6 +429,7 @@ export class Repos extends Asset {
outputSchema: repositoryTagPaginatedResponseSchema.shape,
annotations: {
title: 'List Repository Tags',
readOnlyHint: true,
},
title: 'List tags by repository',
},
Expand All @@ -448,6 +453,7 @@ export class Repos extends Asset {
outputSchema: RepositoryTag.shape,
annotations: {
title: 'Get Repository Tag',
readOnlyHint: true,
},
title: 'Get Repository Tag Details',
},
Expand All @@ -468,6 +474,7 @@ export class Repos extends Asset {
}).shape,
annotations: {
title: 'Check Repository Tag',
readOnlyHint: true,
},
title: 'Check Repository Tag Exists',
},
Expand Down
2 changes: 2 additions & 0 deletions src/scout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class ScoutAPI extends Asset {
});
}
RegisterTools(): void {
// Fork note: DHI discovery is a read-only query and should stay marked as such.
this.tools.set(
'dockerHardenedImages',
this.server.registerTool(
Expand All @@ -72,6 +73,7 @@ export class ScoutAPI extends Asset {
}).shape,
annotations: {
title: 'List available Docker Hardened Images',
readOnlyHint: true,
},
title: 'List available Docker Hardened Images in user organisations',
},
Expand Down
2 changes: 2 additions & 0 deletions src/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export class Search extends Asset {
}

RegisterTools(): void {
// Fork note: Docker Hub search is non-mutating and should stay marked as read-only.
this.tools.set(
'search',
this.server.registerTool(
Expand Down Expand Up @@ -149,6 +150,7 @@ export class Search extends Asset {
outputSchema: searchResults.shape,
annotations: {
title: 'Search Repositories',
readOnlyHint: true,
},
title: 'Search Repositories',
},
Expand Down
33 changes: 22 additions & 11 deletions tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "List Repositories by Namespace"
"title": "List Repositories by Namespace",
"readOnlyHint": true
},
"outputSchema": {
"type": "object",
Expand Down Expand Up @@ -1204,7 +1205,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "Get Repository Info"
"title": "Get Repository Info",
"readOnlyHint": true
},
"outputSchema": {
"type": "object",
Expand Down Expand Up @@ -2294,7 +2296,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "Check Repository Exists"
"title": "Check Repository Exists",
"readOnlyHint": true
}
},
{
Expand Down Expand Up @@ -2333,7 +2336,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "List Repository Tags"
"title": "List Repository Tags",
"readOnlyHint": true
},
"outputSchema": {
"type": "object",
Expand Down Expand Up @@ -2866,7 +2870,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "Get Repository Tag"
"title": "Get Repository Tag",
"readOnlyHint": true
},
"outputSchema": {
"type": "object",
Expand Down Expand Up @@ -3315,7 +3320,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "Check Repository Tag"
"title": "Check Repository Tag",
"readOnlyHint": true
}
},
{
Expand All @@ -3337,7 +3343,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "List Namespaces"
"title": "List Namespaces",
"readOnlyHint": true
},
"outputSchema": {
"type": "object",
Expand Down Expand Up @@ -3512,7 +3519,8 @@
"type": "object"
},
"annotations": {
"title": "Get Personal Namespace"
"title": "Get Personal Namespace",
"readOnlyHint": true
}
},
{
Expand All @@ -3522,7 +3530,8 @@
"type": "object"
},
"annotations": {
"title": "List All Namespaces user is a member of"
"title": "List All Namespaces user is a member of",
"readOnlyHint": true
}
},
{
Expand Down Expand Up @@ -3631,7 +3640,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "Search Repositories"
"title": "Search Repositories",
"readOnlyHint": true
},
"outputSchema": {
"type": "object",
Expand Down Expand Up @@ -3865,7 +3875,8 @@
"$schema": "http://json-schema.org/draft-07/schema#"
},
"annotations": {
"title": "List available Docker Hardened Images"
"title": "List available Docker Hardened Images",
"readOnlyHint": true
}
}
]
Expand Down