Tools/Resources/Prompts support authentication via TC JWT and/or M2M JWT. Providing JWT in the requests to the MCP server will result in specific listings and bahavior based on JWT access level/roles/permissions.
@Tool({
name: 'query-tc-challenges-private',
description:
'Returns a list of Topcoder challenges based on the query parameters.',
parameters: QUERY_CHALLENGES_TOOL_PARAMETERS,
outputSchema: QUERY_CHALLENGES_TOOL_OUTPUT_SCHEMA,
annotations: {
title: 'Query Public Topcoder Challenges',
readOnlyHint: true,
},
canActivate: authGuard,
})
@Tool({
name: 'query-tc-challenges-protected',
description:
'Returns a list of Topcoder challenges based on the query parameters.',
parameters: QUERY_CHALLENGES_TOOL_PARAMETERS,
outputSchema: QUERY_CHALLENGES_TOOL_OUTPUT_SCHEMA,
annotations: {
title: 'Query Public Topcoder Challenges',
readOnlyHint: true,
},
canActivate: checkHasUserRole(Role.Admin),
})
@Tool({
name: 'query-tc-challenges-m2m',
description:
'Returns a list of Topcoder challenges based on the query parameters.',
parameters: QUERY_CHALLENGES_TOOL_PARAMETERS,
outputSchema: QUERY_CHALLENGES_TOOL_OUTPUT_SCHEMA,
annotations: {
title: 'Query Public Topcoder Challenges',
readOnlyHint: true,
},
canActivate: checkM2MScope(M2mScope.QueryPublicChallenges),
})