MCP Server (Legacy Version)¶
Legacy Documentation
This document is the legacy MCP Server integration guide, maintained for historical compatibility only. For new integrations, please refer to MCP Server Quick Start first.
What is MCP Server?¶
MCP Server, the Model Context Protocol, is an open protocol designed to standardize secure connections and data source access between applications and AI models. Its core goal is to enable developers to easily provide context information (such as data, content, operations) to models through unified "tools" and "resources", thereby enhancing model capabilities without the need for retraining.
Services built based on MCP Server ultimately provide a unified multi-model callable interface. This service supports multi-client access and employs an API Key authentication mechanism to securely access the core functionalities of TrueWatch, including monitors, logs, dashboards, and DQL queries.
Getting Started¶
This example uses the Cherry Studio integration method.
Integration Methods
More integration methods are under development. Stay tuned!
Download Version¶
-
Download the MCP Server client Cherry Studio and select the appropriate version.
-
Open Cherry Studio and start configuring the foundational large model service.
This example uses Volcengine to configure the API key.
Configure TrueWatch MCP Service¶
- Customize the service name and description.
- Select type as
streamableHttp. - Define the URL:
https://us1-toby-ai.truewatch.com/toby_ai_mcp/mcp. - The request header format is:
Authorization=DF-API-KEY;Endpoint=SITE_KEY. - After configuring the MCP service, save and enable it. Then return to the homepage and select the MCP service.
Configuration Notes¶
-
The interface uses API KEY for authentication. Each request uses the value of
DF-API-KEYin the request header for validity verification and as the basis for workspace limitation for this request (using the workspace to which this DF-API-KEY belongs). -
All interfaces currently displayed by the MCP service only require providing an API KEY (Header:
DF-API-KEY) as the credential. If the credential exists and is valid, authentication is considered passed. -
The MCP Endpoint configuration parameter is
SITE_KEY, for example:us2. The specific corresponding MAP is as follows:
SITE_KEY_MAP = {
# === Overseas TrueWatch Deployment ===
"us2": "https://us1-openapi.truewatch.com", # Overseas Region 2 (Oregon)
"eu2": "https://eu1-openapi.truewatch.com", # Europe Region 2 (Frankfurt)
"ap2": "https://ap1-openapi.truewatch.com", # Asia-Pacific Region 2 (Singapore)
"za2": "https://za1-openapi.truewatch.com", # Africa Region 2 (South Africa)
"id2": "https://id1-openapi.truewatch.com", # Indonesia Region 2 (Jakarta)
}
Call MCP Service¶
mcp_servers:
guance:
type: streamableHttp
url: https://owl-mcp.guance.com/mcp
headers:
Authorization: Bearer TrueWatch API Key>
enabled: true
Verification:
Tool Overview¶
Currently, 37 business tools are provided, covering Dashboard, Data, Errors, Event, Field Schema, Incident, Infrastructure, LLM, Log Index, Member, Metric, Monitor, Pipeline, APM, RUM, Network, Profile, Catalog, and other domains.
Dashboard¶
owl.dashboard.create¶
Toolset: dashboard
Function: Create a dashboard
Parameters:
name(Required, string): Dashboard namedashboard_json(Required, object): Dashboard template content, must at least includetitleandmain.charts
Example prompts:
- Help me create a dashboard named "APM Overview" with the same title, initially with empty charts.
- Create a new Nginx monitoring dashboard according to the
dashboard_jsonI provide.
owl.dashboard.replace¶
Toolset: dashboard
Function: Replace the content of an existing dashboard
Parameters:
dashboard_uuid(Required, string): Target dashboard UUIDdashboard_json(Required, object): New dashboard template content
Example prompts:
- Replace the dashboard
dsbd_xxxwith this new version configuration I provide. - Update the title and chart layout of the specified dashboard using this
dashboard_json.
owl.dashboard.get¶
Toolset: dashboard
Function: Get dashboard details
Parameters:
dashboard_uuid(Required, string): Dashboard UUID
Example prompts:
- Query the detailed content of dashboard
dsbd_xxx. - Retrieve the complete configuration corresponding to this dashboard UUID.
Data¶
owl.data.show_dql_namespace¶
Toolset: data
Function: View the currently supported DQL namespaces, and whether each namespace supports the index parameter.
Parameters:
- None
Example prompts:
- List the currently supported DQL namespaces.
- Which data namespaces support passing
index?
owl.data.query¶
Toolset: data
Function: Execute Guance's DQL or PromQL queries, applicable to data domains such as logs, metrics, RUM, APM, Network, Profile, etc. If unsure about dql_namespace, call owl.data.show_dql_namespace first. Prioritize using query_text when full expressive power is needed, as it is suitable for writing official DQL syntax directly, such as filtering, time windows, BY grouping, HAVING, ORDER BY, aliases, and aggregate functions. Note that DQL grouping syntax is BY ..., not SQL-style GROUP BY.
Parameters:
dql_namespace(Required, string): Query namespace, common ones likeL(Log),M(Metric)start_time(Required, int): Start time, 13-digit millisecond timestampend_time(Required, int): End time, 13-digit millisecond timestampquery_mode(Optional, string): Query mode, supportsdqlorpromql, wherepromqlis only applicable to metric-type queries.query_text(Optional, string): Complete query statement. When writing DQL, follow the official syntax, e.g.,L::nginx:(count(*)) [1h] BY source, status, do not writeGROUP BY.source(Optional, string): Data source name used to construct a simple query whenquery_textis not provided.select(Optional, string[]): List of select expressions used to construct a simple query whenquery_textis not provided.index(Optional, string): Index name used for the log namespace, corresponding tonamespace[index]in DQL.
Recommended writing style:
- For simple queries, prioritize using
source + select. - When needing
WHERE,BY,HAVING,ORDER BY, complex functions, aliases, or more complete semantics, prioritize usingquery_text. - For log statistics, do not write
COUNT(L::*) GROUP BY .... Instead, write in DQL form likeL::source:(count(*)) ... BY ....
Example prompts:
- Query 500 errors in Nginx logs from the last hour.
- Query CPU usage trends for the last 30 minutes using PromQL.
- Query detailed data for the
nginxsource within thedefaultindex in the log namespace. - Count the number of nginx logs in the last hour grouped by
sourceandstatus.
Errors¶
owl.errors.list¶
Toolset: errors
Function: Query the error center list
Parameters:
start_time(Required, int): Start time, 13-digit millisecond timestampend_time(Required, int): End time, 13-digit millisecond timestamppage_size(Optional, int): Number of items per pagepage_index(Optional, int): Page numberconditions(Optional, string): Filter expressionassigner(Optional, string): Assignee filter conditionissue_status(Optional, string): Error status filter condition
Example prompts:
- Query the error center list for the last 24 hours.
- Check the high-priority error issues currently assigned to Alice.
- Filter Java exception issues from the last week based on conditions.
owl.errors.comment.add¶
Toolset: errors
Function: Add a comment to an error issue
Parameters:
issue_id(Required, string): Error issue IDcomment(Required, string): Comment contentattachment_uuids(Optional, string[]): List of attachment UUIDsextend(Optional, object): Extended fields
Example prompts:
- Add a comment to
issue_xxx: Please check the latest release first. - Append a handling note to this error issue, along with a list of attachment IDs.
owl.errors.comment.list¶
Toolset: errors
Function: Query the comment list of an error issue
Parameters:
issue_id(Required, string): Error issue IDpage_size(Optional, int): Number of items per pagepage_index(Optional, int): Page number
Example prompts:
- List all comments for
issue_xxx. - View the most recent page of comment records for this error issue.
owl.errors.comment.update¶
Toolset: errors
Function: Update an existing error comment
Parameters:
comment_uuid(Required, string): Comment UUIDcomment(Required, string): Updated comment contentattachment_uuids(Optional, string[]): List of attachment UUIDsextend(Optional, object): Extended fields
Example prompts:
- Update comment
comment_xxxto "Root cause confirmed, fixing in progress." - Update the body of this error comment and supplement the attachment list.
Event¶
owl.event.list¶
Toolset: event
Function: Query the event list
Parameters:
start_time(Required, int): Start time, 13-digit millisecond timestampend_time(Required, int): End time, 13-digit millisecond timestampstatus(Optional, string): Event statuslimit(Optional, int): Maximum number of items to return, max 100
Example prompts:
- Query the event list for the last 6 hours.
- List events from the last day with status "Alerting", returning up to 50 items.
owl.event.get¶
Toolset: event
Function: Get event details
Parameters:
doc_id(Required, string): Event document ID
Example prompts:
- View the detailed information of event
doc_xxx. - Display the complete original event content corresponding to this event ID.
Field Schema¶
owl.field_schema.get¶
Toolset: field_schema
Function: Get a simplified field catalog, suitable for viewing available fields before constructing query conditions or selecting fields.
Parameters:
- None
Example prompts:
- List the currently available field catalog.
- I want to write a data query, first show me the field list.
Incident¶
owl.incident.list¶
Toolset: incident
Function: Query the Incident list
Parameters:
search(Optional, string): Keyword searchpage_size(Optional, int): Number of items per pagepage_index(Optional, int): Page number
Example prompts:
- Query the current Incident list.
- Search for Incidents whose names contain "Redis".
Incident Comment¶
owl.incident_comment.list¶
Toolset: incident_comment
Function: Query the comment list for a specified Incident
Parameters:
incident_uuid(Required, string): Incident UUID
Example prompts:
- View the comment list for Incident
inc_xxx. - List all comments under this Incident chronologically.
owl.incident_comment.add¶
Toolset: incident_comment
Function: Add a comment to a specified Incident
Parameters:
incident_uuid(Required, string): Incident UUIDcomment(Required, string): Comment content
Example prompts:
- Add a comment to
inc_xxx: Contacting the on-duty engineer for handling. - Append a latest progress note to this Incident.
Incident Operation¶
owl.incident_operation.list¶
Toolset: incident_operation
Function: Query Incident operation records
Parameters:
incident_uuid(Required, string): Incident UUIDpage_size(Optional, int): Number of items per pagepage_index(Optional, int): Page number
Example prompts:
- View the operation records for
inc_xxx. - List the recent two pages of operation history for this Incident.
Incident Schedule¶
owl.incident_schedule.list¶
Toolset: incident_schedule
Function: Query the Incident schedule list
Parameters:
search(Optional, string): Schedule name keywordpage_size(Optional, int): Number of items per pagepage_index(Optional, int): Page number
Example prompts:
- List all current Incident schedules.
- Search for schedules whose names contain "SRE".
owl.incident_schedule.get¶
Toolset: incident_schedule
Function: Get Incident schedule details
Parameters:
schedule_uuid(Required, string): Schedule UUID
Example prompts:
- View the detailed configuration of schedule
schedule_xxx. - Display the timezone, time periods, and notification targets for this on-duty schedule.
Infrastructure¶
owl.infrastructure.list¶
Toolset: infrastructure
Function: Query the infrastructure object list, supporting three resource types: host, container, process.
Parameters:
resource_type(Required, string): Resource type, supportshost,container,processlimit(Optional, int): Maximum number of items to return, max 100filters(Optional, object[]): List of filter conditions. Each item containsfield,op,value
Example prompts:
- List recently visible host objects.
- Query containers whose names contain
prod, returning up to 20 items. - Filter the process object list based on field conditions.
owl.infrastructure.get¶
Toolset: infrastructure
Function: Get details of a single infrastructure object
Parameters:
resource_type(Required, string): Resource type, supportshost,container,processidentity_value(Required, string): Object identifier value
Example prompts:
- View detailed information for host
host-01. - Get the complete object details for container
container_xxx.
LLM¶
owl.llm.list¶
Toolset: llm
Function: Query the LLM application list
Parameters:
search(Optional, string): Keyword searchtype(Optional, string): Application type filterpage_size(Optional, int): Number of items per pagepage_index(Optional, int): Page number
Example prompts:
- List all current LLM applications.
- Search for LLM applications whose names contain "chat".
- Filter by type and return the first page of the application list.
Log Index¶
owl.log_index.list¶
Toolset: log_index
Function: Query the log index list, suitable for determining available indexes before performing log queries.
Parameters:
- None
Example prompts:
- List all current log indexes.
- I'm about to query logs, first show me the available indexes.
owl.log_index.get¶
Toolset: log_index
Function: Get log index details
Parameters:
index_uuid(Required, string): Log index UUID
Example prompts:
- View the detailed configuration of log index
index_xxx. - Display the index details corresponding to this index UUID.
Member¶
owl.member.list¶
Toolset: member
Function: Query the member list
Parameters:
search(Optional, string): Member name or email keyword
Example prompts:
- List all members of the current workspace.
- Search for members whose email contains
alice.
Metric¶
owl.metric.list¶
Toolset: metric
Function: Query the discovery results of sources or fields in the metric domain, used for subsequent data queries.
Parameters:
mode(Optional, string):sourceorfield, default issource
Example prompts:
- List currently available metric sources.
- See which fields in the metric domain can be used for queries.
Monitor¶
owl.monitor.list¶
Toolset: monitor
Function: Query the monitor list
Parameters:
search(Optional, string): Monitor name keywordstatus_list(Optional, int[]): Status list, supports0,2
Example prompts:
- List all current monitors.
- Query enabled monitors whose names contain "CPU".
owl.monitor.get¶
Toolset: monitor
Function: Get monitor details
Parameters:
rule_uuid(Required, string): Monitor rule UUID
Example prompts:
- View the detailed configuration of monitor
rul_xxx. - Retrieve the complete definition of this monitor rule.
owl.monitor.upsert¶
Toolset: monitor
Function: Create a monitor, or update an existing monitor when rule_uuid is provided.
Parameters:
json_script(Required, object): Monitor configuration objectrule_uuid(Optional, string): Existing monitor rule UUID, triggers update when provided.status(Optional, int): Monitor status, supports0,2secret(Optional, string): Used whenjson_script.typeisOuterEventChecker.alert_policy_uuids(Optional, string[]): List of alert policy UUIDsextend(Optional, object): Extended fieldstags(Optional, array): List of tags
Example prompts:
- Create a monitor for high CPU usage.
- Update the title and alert message of monitor
rul_xxx. - Create an
OuterEventCheckertype monitor and bind it to specified alert policies.
owl.monitor.receive¶
Toolset: monitor
Function: Receive external events. Supports direct delivery to an existing target, or creating an OuterEventChecker first and then delivering the event.
Parameters:
event(Required, object): Event object, must containstatus,title,message,dimension_tags,check_valuetarget(Optional, object): Existing event receiving target, containssecret,sub_urimonitor(Optional, object): Monitor configuration for creating a receiving target, containssecret,sub_uri,status,title,message_template,alert_policy_uuidsextra_data(Optional, object): Additional data
Example prompts:
- Send this external alert event to the specified target.
- First create an event receiving monitor, then push the CPU alert event into it.
- Report a critical event using the existing
secretandsub_uri.
Network¶
owl.network.list¶
Toolset: network
Function: Query the discovery results of sources or fields in the network domain, used for subsequent data queries.
Parameters:
mode(Optional, string):sourceorfield, default issource
Example prompts:
- List currently available network sources.
- See which fields in the network domain can be directly queried.
Pipeline¶
owl.pipeline.list¶
Toolset: pipeline
Function: Query the Pipeline list and return Pipeline content that can be read directly.
Parameters:
search(Optional, string): Pipeline name keywordscope(Optional, string): Pipeline scopecategories(Optional, string[]): Category filter list
Example prompts:
- List all current Pipelines.
- Search for Pipelines whose names contain
nginx. - Query Pipelines under the
localscope with specified categories.
owl.pipeline.validate¶
Toolset: pipeline
Function: Validate a Pipeline. The current call returns a fixed result DEFERRED_TOOL.
Parameters:
- None
Example prompts:
- Validate a Pipeline rule.
- Try to execute the Pipeline validation tool.
Profile¶
owl.profile.list¶
Toolset: profile
Function: Query the discovery results of sources or fields in the performance profiling domain, used for subsequent data queries.
Parameters:
mode(Optional, string):sourceorfield, default issource
Example prompts:
- List currently available profile sources.
- See which fields are in the profile domain.
RUM¶
owl.rum.list¶
Toolset: rum
Function: Query the discovery results of sources or fields in the RUM domain, used for subsequent data queries.
Parameters:
mode(Optional, string):sourceorfield, default issource
Example prompts:
- List currently available RUM sources.
- See which fields are in the RUM domain.
APM¶
owl.apm.list¶
Toolset: apm
Function: Query the discovery results of sources or fields in the APM domain, used for subsequent data queries.
Parameters:
mode(Optional, string):sourceorfield, default issource
Example prompts:
- List currently available APM sources.
- See which fields are in the APM domain.
Catalog¶
owl.catalog.query¶
Toolset: catalog
Function: Query Catalog. The current call returns a fixed result DEFERRED_TOOL.
Parameters:
- None
Example prompts:
- Query Catalog content.
- Try to execute the Catalog query tool.
owl.catalog.update¶
Toolset: catalog
Function: Update Catalog. The current call returns a fixed result DEFERRED_TOOL.
Parameters:
- None
Example prompts:
- Update an object in the Catalog.
- Try to execute the Catalog update tool.
Typical Usage Paths¶
Data Analysis Questions¶
- First call
owl.data.show_dql_namespaceto confirm the namespace. - Call
owl.metric.list,owl.rum.list,owl.apm.list,owl.network.list,owl.profile.list,owl.log_index.list,owl.field_schema.getas needed to obtain the required source, field, index for the query. - Finally call
owl.data.queryto execute the formal query.
Alerting and Troubleshooting Questions¶
- Use
owl.monitor.list,owl.monitor.getto view monitors. - Use
owl.event.list,owl.event.getto view events. - Use
owl.incident.list,owl.incident_comment.list,owl.incident_operation.listto view Incident progress. - Use
owl.errors.listand comment tools to track error issue handling processes.
Configuration Management Questions¶
- Use
owl.dashboard.create,owl.dashboard.replace,owl.dashboard.getto manage dashboards. - Use
owl.pipeline.listto view Pipelines. - Use
owl.monitor.upsertto create or update monitors.
