Skip to content

Commit 85194ff

Browse files
patch: Remove get_ownership tool as the oauth scopes are gone
1 parent 00ef3ae commit 85194ff

File tree

4 files changed

+7
-49
lines changed

4 files changed

+7
-49
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
- Added `status` parameter to `list_problems` tool to filter problems by status (ACTIVE, CLOSED, or ALL).
88
- Added `timeframe` parameter to `list_problems` tool to support flexible time ranges (e.g., "12h", "24h", "7d", "30d"). Default: "24h".
9+
- Removed `get_ownership` tool as it no longer works with OAuth Clients.
10+
11+
### Scopes
12+
13+
- Removed `settings:objects:read` and `environment-api:entities:read` scopes, as they are no longer required
914

1015
## 0.12.0
1116

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ Depending on the features you are using, the following scopes are needed:
330330
**Available for both Platform Tokens and OAuth Clients:**
331331

332332
- `app-engine:apps:run` - needed for almost all tools
333-
- `environment-api:entities:read` - for retrieving ownership details from monitored entities (_currently not available for Platform Tokens_)
334333
- `automation:workflows:read` - read Workflows
335334
- `automation:workflows:write` - create and update Workflows
336335
- `automation:workflows:run` - run Workflows
336+
- `app-settings:objects:read` - read app-settings - needed for `send_slack_message` tool to read connection details from App-Settings
337337
- `storage:buckets:read` - needed for `execute_dql` tool to read all system data stored on Grail
338338
- `storage:logs:read` - needed for `execute_dql` tool to read logs for reliability guardian validations
339339
- `storage:metrics:read` - needed for `execute_dql` tool to read metrics for reliability guardian validations
@@ -350,14 +350,11 @@ Depending on the features you are using, the following scopes are needed:
350350
- `davis-copilot:nl2dql:execute` - execute Davis Copilot Natural Language (NL) to DQL skill
351351
- `davis-copilot:dql2nl:execute` - execute DQL to Natural Language (NL) skill
352352
- `email:emails:send` - needed for `send_email` tool to send emails
353-
- `settings:objects:read` - needed for reading ownership information and Guardians (SRG) from settings
354353

355354
**Notes**:
356355

357-
- Please ensure that `settings:objects:read` is used, and _not_ the similarly named scope `app-settings:objects:read`.
358356
- Versions before 0.12.0 required the scope `app-engine:functions:run`, which is no longer required.
359-
360-
**Important**: Some features requiring `environment-api:entities:read` will not work with Platform Tokens.
357+
- Versions before 0.13.0 required the scopes `settings:objects:read` and `environment-api:entities:read`, which are no longer required.
361358

362359
## ✨ Example prompts ✨
363360

src/capabilities/get-ownership-information.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/index.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { getPackageJsonVersion } from './utils/version';
2424
import { createDtHttpClient } from './authentication/dynatrace-clients';
2525
import { listVulnerabilities } from './capabilities/list-vulnerabilities';
2626
import { listProblems } from './capabilities/list-problems';
27-
import { getOwnershipInformation } from './capabilities/get-ownership-information';
2827
import { getEventsForCluster } from './capabilities/get-events-for-cluster';
2928
import { createWorkflowForProblemNotification } from './capabilities/create-workflow-for-problem-notification';
3029
import { updateWorkflow } from './capabilities/update-workflow';
@@ -90,8 +89,6 @@ const allRequiredScopes = scopesBase.concat([
9089

9190
// Settings and configuration scopes
9291
'app-settings:objects:read', // Read app settings objects
93-
'settings:objects:read', // Read settings objects
94-
'environment-api:entities:read', // Read entities via environment API
9592

9693
// Davis CoPilot scopes
9794
'davis-copilot:nl2dql:execute', // Convert natural language to DQL
@@ -1031,28 +1028,6 @@ const main = async () => {
10311028
},
10321029
);
10331030

1034-
tool(
1035-
'get_ownership',
1036-
'Get detailed Ownership information for one or multiple entities on Dynatrace',
1037-
{
1038-
entityIds: z.string().optional().describe('Comma separated list of entityIds'),
1039-
},
1040-
{
1041-
readOnlyHint: true,
1042-
},
1043-
async ({ entityIds }) => {
1044-
const dtClient = await createAuthenticatedHttpClient(
1045-
scopesBase.concat('environment-api:entities:read', 'settings:objects:read'),
1046-
);
1047-
console.error(`Fetching ownership for ${entityIds}`);
1048-
const ownershipInformation = await getOwnershipInformation(dtClient, entityIds);
1049-
console.error(`Done!`);
1050-
let resp = 'Ownership information:\n';
1051-
resp += JSON.stringify(ownershipInformation);
1052-
return resp;
1053-
},
1054-
);
1055-
10561031
tool(
10571032
'reset_grail_budget',
10581033
'Reset the Grail query budget after it was exhausted, allowing new queries to be executed. This clears all tracked bytes scanned in the current session.',

0 commit comments

Comments
 (0)