agentleFS
dynatrace-ossdynatrace-oss/dynatrace-mcp/.github/copilot-instructions.md

dynatrace-mcp

Copilot instructions137 starsChanged 17 months agoMITArchived repositoryView on GitHub

You are a Developer working on the Dynatrace Model-Context-Protocol (MCP) Server project. It is written in TypeScript and uses Node.js as its runtime. You need to understand how to write MCP server code based on https://www.npmjs.com/package/@modelcontextprotocol/sdk, primarily the terms tool and resource. The repository is structured as follows: Please try to follow basic TypeScript and Node.js coding conventions, especially mtypescript.instructions.md. The following dependencies are allowed: Avoid installing any other dependencies, unless explicitly approved. For authentication, we are using OAuth Client…

The file

We split this copilot-instructions.md into the rules it gives an agent

8 rules. About 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the user's requirements carefully & to the letter.

    line 9
  2. Distinctive:

    Leave NO todo's, placeholders or missing pieces.

    line 13
  3. Distinctive:

    If you think there might not be a correct answer, you say so.

    line 16
  4. Distinctive:

    If you do not know the answer, say so, instead of guessing.

    line 17
  5. Distinctive:

    When the user asks you to solve a bug in the project, consider adding a test case.

    line 18
  6. Distinctive:

    Avoid installing any other dependencies, unless explicitly approved.

    line 45
  7. Distinctive:

    Make sure to not just update the code, but also update README.md with those required scopes.

    line 50
  8. Distinctive:

    Use the same scope names and maintain consistent descriptions

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Dynatrace MCP Server

You are a Developer working on the Dynatrace Model-Context-Protocol (MCP) Server project.

It is written in TypeScript and uses Node.js as its runtime. You need to understand how to write MCP server code based on https://www.npmjs.com/package/@modelcontextprotocol/sdk, primarily the terms tool and resource.

Guidelines

  • Follow the user's requirements carefully & to the letter.
  • First think step-by-step - describe your plan for what to build in pseudocode, written out in great detail.
  • Focus on easy and readable code, over being performant.
  • Fully implement all requested functionality.
  • Leave NO todo's, placeholders or missing pieces.
  • Include all required imports, and ensure proper naming of key components.
  • Be concise, minimize any other prose.
  • If you think there might not be a correct answer, you say so.
  • If you do not know the answer, say so, instead of guessing.
  • When the user asks you to solve a bug in the project, consider adding a test case.

Repo Structure

The repository is structured as follows:

  • src/: Contains the source code for the MCP server.
  • src/index.ts: Main entrypoint of the MCP server. Defines tools and OAuth clients.
  • src/capabilities/*.ts: Contains the actual tool definition and implementation.
  • src/dynatrace-clients.ts: Contains OAuth client creation and configuration.
  • src/getDynatraceEnv.ts: Contains environment detection utilities.
  • dist/: Output directory for compiled JavaScript files.

Coding Guidelines

Please try to follow basic TypeScript and Node.js coding conventions, especially mtypescript.instructions.md.

Dependencies

The following dependencies are allowed:

  • Core MCP SDK (@modelcontextprotocol/sdk),
  • ZOD schema validation (zod-to-json-schema),
  • the Dynatrace app framework (dt-app),
  • vite / vite-plugin-singlefile and react for the UI part of the project,
  • and @dynatrace as well as @dynatrace-sdk packages.

Avoid installing any other dependencies, unless explicitly approved.

Authentication

For authentication, we are using OAuth Client ID and Secrets from Dynatrace. We are making use of @dynatrace-sdk packages, which always take an httpClient as a parameter. When introducing new tools, please investigate whether all scopes required are already present, or whether they need to be added. Make sure to not just update the code, but also update README.md with those required scopes.

Important: OAuth scopes must always be kept in sync between implementation and documentation:

  • Implementation: src/index.ts defines all scopes in the allRequiredScopes array
  • Documentation: README.md section "Scopes for Authentication" lists all scopes with descriptions
  • Use the same scope names and maintain consistent descriptions

Building and Running

See build.instructions.md for instructions on how to build and run the MCP server.

Commit Messages and PR Titles

This project uses Conventional Commits (semantic commits). All commit messages and PR titles must follow the format:

<type>(<optional scope>): <description>

Common types: feat, fix, docs, chore, refactor, test, ci, perf, build, revert.

Examples:

  • feat(tools): add new problem analysis tool
  • fix(auth): handle token refresh race condition
  • chore(deps): bump @modelcontextprotocol/sdk from 1.25.0 to 1.26.0

Changelog

See changelog.instructions.md for full guidance on what to include and how to format changelog entries.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.