Skip to content

Commit 56b9f90

Browse files
[resources] Add new resources to server with fallback tool
1 parent aeb105e commit 56b9f90

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/resources/mapbox-token-scopes-resource/MapboxTokenScopesResource.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Secret tokens (like \`MAPBOX_ACCESS_TOKEN\` environment variable) typically have
9393
- **Purpose**: List and read token information
9494
- **Required for**: \`list_tokens_tool\`
9595
- **Security**: Keep secret, reveals account tokens
96+
- **Note**: When listing tokens, the actual token value is only returned for public tokens; secret token values are omitted for security (only metadata like id, scopes, and creation date is shown)
9697
9798
### \`tokens:write\`
9899
- **Purpose**: Create, update, and delete tokens

src/tools/list-tokens-tool/ListTokensTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class ListTokensTool extends MapboxApiBasedTool<
2020
> {
2121
readonly name = 'list_tokens_tool';
2222
readonly description =
23-
'List Mapbox access tokens for the authenticated user with optional filtering and pagination. When using pagination, the "start" parameter must be obtained from the "next_start" field of the previous response (it is not a token ID)';
23+
'List Mapbox access tokens for the authenticated user with optional filtering and pagination. Returns metadata for all tokens (public and secret), but the actual token value is only included for public tokens (secret token values are omitted for security). When using pagination, the "start" parameter must be obtained from the "next_start" field of the previous response (it is not a token ID)';
2424
readonly annotations = {
2525
readOnlyHint: true,
2626
destructiveHint: false,

test/tools/__snapshots__/tool-naming-convention.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ exports[`Tool Naming Convention > should maintain consistent tool list (snapshot
5454
},
5555
{
5656
"className": "ListTokensTool",
57-
"description": "List Mapbox access tokens for the authenticated user with optional filtering and pagination. When using pagination, the "start" parameter must be obtained from the "next_start" field of the previous response (it is not a token ID)",
57+
"description": "List Mapbox access tokens for the authenticated user with optional filtering and pagination. Returns metadata for all tokens (public and secret), but the actual token value is only included for public tokens (secret token values are omitted for security). When using pagination, the "start" parameter must be obtained from the "next_start" field of the previous response (it is not a token ID)",
5858
"toolName": "list_tokens_tool",
5959
},
6060
{

test/tools/list-tokens-tool/ListTokensTool.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('ListTokensTool', () => {
3838

3939
expect(tool.name).toBe('list_tokens_tool');
4040
expect(tool.description).toBe(
41-
'List Mapbox access tokens for the authenticated user with optional filtering and pagination. When using pagination, the "start" parameter must be obtained from the "next_start" field of the previous response (it is not a token ID)'
41+
'List Mapbox access tokens for the authenticated user with optional filtering and pagination. Returns metadata for all tokens (public and secret), but the actual token value is only included for public tokens (secret token values are omitted for security). When using pagination, the "start" parameter must be obtained from the "next_start" field of the previous response (it is not a token ID)'
4242
);
4343
});
4444

0 commit comments

Comments
 (0)