Skip to main content
Glama
microsoft

Microsoft Fabric RTI MCP Server

Official
by microsoft

kusto_graph_query

Read-only

Execute Kusto graph queries with automatic snapshot or transient graph fallback, requiring graph-match and project clauses for results.

Instructions

Intelligently executes a graph query using snapshots if they exist,
otherwise falls back to transient graphs.
If no database is provided, uses the default database.

:param graph_name: Name of the graph to query.
:param query: The KQL query to execute after the graph() function.
Must include proper project clause for graph-match queries.
:param cluster_uri: The URI of the Kusto cluster.
:param database: Optional database name. If not provided, uses the default database.
:param client_request_properties: Optional dictionary of additional client request properties.
:return: List of dictionaries containing query results.

Critical:
* Graph queries must have a graph-match clause and a projection clause.
Optionally they may contain a where clause.
* Graph entities are only accessible in the graph-match scope.
    When leaving that scope (sub-sequent '|'), the data is treated as a table,
    and graph-specific functions (like labels()) will not be available.
* Always prefer expressing everything with graph patterns.
  Avoid using graph-to-table operator unless you have no other way around it.
* There is no id() function on graph entities. If you need a unique identifier,
  make sure to check the schema and use an appropriate property.
* There is no `type` property on graph entities.
  Use `labels()` function to get the list of labels for a node or edge.
* Properties that are used outside the graph-match context are renamed to `_` instead of `.`.
  For example, `node.name` becomes `node_name`.
* For variable length paths, you can use `all` or `any` to enforce conditions on all/any edges
  in variable path length elements (e.g. `()-[e*1..3]->() where all(e, labels() has 'Label')`).

Examples:

# Basic node counting with graph-match (MUST include project clause):
kusto_graph_query(
    "MyGraph",
    "| graph-match (node) project labels=labels(node)
     | mv-expand label = labels
     | summarize count() by tostring(label)",
    cluster_uri
)

# Relationship matching:
kusto_graph_query(
    "MyGraph",
    "| graph-match (house)-[relationship]->(character)
        where labels(house) has 'House' and labels(character) has 'Character'
        project house.name, character.firstName, character.lastName
    | project house_name=house_name, character_full_name=character_firstName + ' ' + character_lastName
    | limit 10",
    cluster_uri
)

# Variable length path matching:
kusto_graph_query(
    "MyGraph",
    "| graph-match (source)-[path*1..3]->(m)-[e]->(target)
        where all(path, labels() has 'Label')
        project source, destination, path, m, e, target
    | take 100",
    cluster_uri
)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graph_nameYes
queryYes
cluster_uriYes
databaseYes
client_request_propertiesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, ensuring the agent knows it's safe. The description adds detailed behavioral insights: snapshot fallback, default database behavior, graph-match query constraints (e.g., required project clause, property renaming), and the absence of id() and type functions. These exceed what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with an overview, parameter docs, critical notes, and three examples. While lengthy, each section is valuable and the critical notes are essential for correct usage. It is front-loaded with the purpose and param docs before details, but could potentially condense examples to one or two.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (graph queries with special constraints), zero schema parameter descriptions, and the existence of an output schema, the description fully covers: snapshot behavior, default database, all parameter meanings, critical constraints (no id(), no type, property renaming, variable-length path syntax), and return format. Multiple examples further clarify usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description includes a parameter documentation section with 'param' lines explaining each parameter's purpose and constraints. It clarifies 'graph_name' as the graph name, 'query' as KQL query with project clause requirement, 'database' as optional default, and 'client_request_properties' as optional dictionary. This adds essential meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it 'Intelligently executes a graph query using snapshots if they exist, otherwise falls back to transient graphs,' specifying the verb 'executes', the resource 'graph query', and the scope of snapshot usage. This distinguishes it from sibling tools like kusto_query which handle regular Kusto queries.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides usage context for graph queries with critical notes and examples, but does not explicitly contrast with alternative tools such as kusto_query or provide when-not-to-use guidance. The examples demonstrate usage but lack comparative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microsoft/fabric-rti-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server