Create a tool from Knowledge Graph

  • Release version: Zurich
  • Updated June 8, 2026
  • 2 minutes to read
  • Create a tool from Knowledge Graph to expose it to Model Context Protocol (MCP) clients from an MCP Server. Knowledge Graph provides agents with accurate, relationship-aware access to live instance data. This enables more precise, context-aware responses in every workflow by directly querying relationships.

    Before you begin

    Role required: sn_mcp_server.tools_admin, sn_mcp_server.admin, or admin

    See Exploring Knowledge Graph to explore Enterprise graphs and learn about creating Knowledge Graph.

    Procedure

    1. Select Knowledge Graph from these categories.
      Tool creation
    2. On the form, fill in the fields.
      Create tool from Knowledge graph
      Note:
      The category is auto-populated if selected in the last modal.
      Table 1. Tool form
      Field Description
      Knowledge Graph Select a Knowledge Graph type from the list. You can either choose Enterprise Graph or one of the custom graphs.
      Label An internal name for the tool.
      MCP app An active MCP app linked to this knowledge graph tool.
      Description
      The description of what the tool intends to do. This input is exposed to AI clients and used to determine when to call this tool.
      Note:
      Admins must add specific and action-oriented description as the AI clients access it to decide when to invoke the tool.
      Annotations

      Indication of the tool's behavior with MCP clients. 'Read Only' is the default annotation or tool behavior Knowledge Graph.

      The MCP client will use the selected annotations to categorise tools according to their behavior.

      MCP Servers One or more servers you want to add your tool to.
      In the Tool inputs section, the fields associated with the capability are added. Tool input for Knowledge graph
      • anchortables: Use one or more table names to make your query more specific when you select Enterprise Graph or Enterprise Graph (small). This is helpful when you know which tables are relevant to your question. This is an optional field.
      • tags: Include one or more tags to prioritize a specific group of tables. For example, you can use tags like 'CSM', 'HR'. These tags are required for the Enterprise Graph and Enterprise Graph (small) though they are only mandatory for the latter. See Create Knowledge Graph tag for details on creating Knowledge Graph tags.
      • description: Your query or request that will use Knowledge Graph.
      • apioptions: Manually enter the JSON object as a collection of key-value pairs. It configures how to run queries and organizes the response:
        Table 2. API option type and purpose
        Option Type Default Purpose
        resultLimit Number 10 Control how many records are returned in the response
        getEncodedQuery Boolean false Include a ServiceNow encoded query per table — useful for navigating to matching records in the UI
        getStatusMessages Boolean false Include a meta field with messages about result truncation and execution errors
        showColumnProperties Boolean false Include metadata for each column (table name, display value, sys_id) alongside the raw value
        groupByTable Boolean false Group result columns by their source table name — results structured as { tableName: { columnName: value } }
        getExplanation Boolean false Include an explanation of the query — the tables, relationships, etc. to get the results
      See Create a tool for a Model Context Protocol server to learn more. The tool is now published on the MCP Server and discoverable by MCP clients.