Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 19, 2025

This PR implements server-level instructions for the Fabric RTI MCP server to provide AI agents with comprehensive context on how to effectively use the available tools and services.

Changes Made

Added fabric_rti_mcp/instructions.py

  • Comprehensive server instructions (4,128 characters) that provide agents with:
    • Overview of available services (Kusto/Eventhouse and Eventstream)
    • Tool categorization and usage guidance for 19 total tools
    • Common workflows and example usage patterns
    • Security considerations and best practices
    • Configuration guidance and environment variable explanations
    • Getting started steps for new users

Updated fabric_rti_mcp/server.py

  • Modified FastMCP instantiation to include the server instructions
  • Instructions are now passed to the MCP protocol layer for agent consumption

Added comprehensive tests in tests/test_instructions.py

  • 5 test cases covering instruction content, format, and integration
  • Validates that instructions contain expected sections and tool references
  • Ensures proper FastMCP integration

Example Usage Patterns Covered

The instructions help agents understand when and how to use different services:

### Data Exploration Workflow
1. Start with `kusto_known_services` to see available clusters
2. Use `kusto_list_databases` to find databases of interest  
3. Use `kusto_list_tables` to discover available data
4. Use `kusto_get_table_schema` to understand data structure
5. Run analytical queries with `kusto_query`

### Stream Management Workflow  
1. Use `eventstream_list` to see existing streams
2. Use `eventstream_get_definition` to understand configuration
3. Create new streams with `eventstream_create_simple`

Benefits

  • Improved Agent Experience: Agents now receive context about the 19 available tools across both services
  • Better Tool Discovery: Clear categorization helps agents choose the right tool for their task
  • Security Awareness: Instructions highlight destructive operations and authentication handling
  • Reduced Trial-and-Error: Example workflows guide agents through common use cases

The implementation leverages the MCP protocol's server-level instructions feature (introduced in modelcontextprotocol/modelcontextprotocol#148) to provide this context without requiring changes to individual tools.

Fixes #52.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Use server level instructions to set up the agent with the right context Implement server-level instructions for agent context and usage guidance Aug 19, 2025
@Copilot Copilot AI requested a review from danield137 August 19, 2025 00:19
Copilot finished work on behalf of danield137 August 19, 2025 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use server level instructions to set up the agent with the right context
2 participants