Create a tool from a Knowledge Graph

task brazil Updated Jun 8, 2026 4 min read create-a-tool-from-knowledge-graphs.md
Raw file servicenow.com

Create a tool from a Knowledge Graph to expose it to Model Context Protocol (MCP) clients from an MCP Server.

Before you begin

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

About this task

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. Some Knowledge Graph schemas are available by default when creating a tool. For more information, see Knowledge Graph schema support in MCP Server Console. To learn about creating Knowledge Graph schemas, see Exploring Knowledge Graph.

Procedure

  1. Select Knowledge Graph from these categories.

    [Omitted image "mcp-create-tool-moveworks.png"] Alt text: Tool creation

  2. On the form, fill in the fields.

    [Omitted image "mcp-server-create-tool-kg.png"] Alt text: Create tool from Knowledge graph

    Note: The category is auto-populated if selected in the last modal.

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.

Required roles

The MCP Tools admin selects one or more roles from the User Role [sys_user_role] table to specify which roles can access and use the tool.

MCP Servers

One or more servers you want to add your tool to.

**Note:** A tool can be used by multiple servers so any changes that you make to a tool apply to all servers that use the tool. Before editing a tool, review which servers it's associated with to determine the impact for every server.
In the Tool inputs section, the fields associated with the capability are added.

\[Omitted image "mcp-server-create-tool-kg-toolinput.png"\] Alt text: 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/brazil/markdown/intelligent-experiences/knowledge-graph/create-knowledge-graph-tags.md) 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:

    |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|
  1. Turn off inputs from the tool that you don't want to expose.

    1. In the Tool inputs section, locate the tool input.

    2. From the Enabled column, select the toggle to turn off the input.

      Note: Some tool inputs are required and can't be turned off.

  2. Select Create.

What to do next

Configure clients to connect to the server and use the tool. For more information, see Connecting to an MCP server from an MCP client.

Parent Topic:Creating tools for a Model Context Protocol server

Keywords Create tool Knowledge graph for MCP
Search documentation
Search document titles and file paths on the brazil branch