Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion modules/ROOT/pages/common/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ include::generated/typedoc/CustomSideNav.adoc[]
*** link:{{navprefix}}/webhooks-kpi[Webhook for KPI alerts]
*** link:{{navprefix}}/webhooks-lb-schedule[Webhook for Liveboard schedule events ^Beta^]

* MCP Servers and Tools
** link:{{navprefix}}/SpotterCode[SpotterCode for IDEs]
*** link:{{navprefix}}/integrate-SpotterCode[Integrating SpotterCode]
*** link:{{navprefix}}/spottercode-prompting-guide[SpotterCode prompting guide]
** link:{{navprefix}}/mcp-integration[ThoughtSpot MCP server]

* link:{{navprefix}}/development-and-deployment[Deployment and integration]
** link:{{navprefix}}/development-and-deployment[Development and deployment]
*** link:{{navprefix}}/thoughtspot-objects[ThoughtSpot objects overview]
Expand All @@ -235,10 +241,10 @@ include::generated/typedoc/CustomSideNav.adoc[]
*** link:{{navprefix}}/single-tenant-data-models[Single-tenant data models with Orgs]
*** link:{{navprefix}}/orgs-api-op[Org administration]
** link:{{navprefix}}/tse-cluster[Cluster maintenance and upgrade]

* Integration with external tools
** link:{{navprefix}}/external-tool-script-integration[External tools and scripts]
** link:{{navprefix}}/pendo-integration[Pendo integration with embed]
** link:{{navprefix}}/mcp-integration[MCP server integration]
** link:{{navprefix}}/sf-integration[Integration with Salesforce]
** link:{{navprefix}}/vercel-integration[Vercel integration]
* Additional references
Expand Down
8 changes: 8 additions & 0 deletions modules/ROOT/pages/full-app-customize.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ The Visual Embed SDK provides several controls to customize the embedded view, i
The classic (V1) experience and V2 experience modes will be deprecated in an upcoming release in 2026. Therefore, ThoughtSpot recommends upgrading the UI experience of your full application embedding to the V3 experience.
--


[div announcementBlock]
--
[IMPORTANT]
The V1 classic experience and V2 experience modes will be deprecated in an upcoming release in 2026. Therefore, ThoughtSpot recommends that you start upgrading your full app embedding implementation to the V3 UI experience.
--

== UI experience modes
ThoughtSpot application supports the following UI experience modes:

Expand All @@ -27,6 +34,7 @@ The key differences between these UI experience modes are listed in the followin
--
[width="100%", cols="2,4,4,5"]
[options='header']

|=====
|Feature component |Classic (V1) experience | V2 experience | V3 experience
|**UI experience**| Classic layout +
Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/multi-tenancy-intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ At a basic level:

* if the prod data warehouse is *single-tenanted* and each end customer’s data is separated in different databases or schemas, then a xref:single-tenant-data-models.adoc[prod Org per end customer deployment pattern] is used, with the final deployment from a "release" environment to each individual "end customer prod" environment

The actual level of multi-tenant Org separation is totally up to ThoughtSpot Customer, dependent on your business requirements
The actual level of multi-tenant Org separation is totally up to ThoughtSpot Customer, dependent on your business requirements.

////
== Related information
Expand Down
139 changes: 139 additions & 0 deletions modules/ROOT/pages/spottercode-integration.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
= Integrate SpotterCode with your IDE
:toc: true
:toclevels: 2

:page-title: SpotterCode integration gude
:page-pageid: integrate-SpotterCode
:page-description: This document provides a comprehensive, step-by-step approach to integrating SpotterCode with your development environment

Connecting your IDE to ThoughtSpot's SpotterCode is easy. All you need is the SpotterCode MCP Server URL. This guide will walk you through the process of adding SpotterCode to your IDE.

== Before you begin

* Ensure that your IDE is AI-native and supports chat sessions with AI models.
* Ensure that you have the necessary permissions to configure MCP servers on your IDE.
* Ensure that the latest version of Node.js is installed in your environment. This is required for building embedding code with the SDK.
* Ensure that you have access to a ThoughtSpot instance and can view the objects and resources that you want to embed or access via the REST API.

== Integrate SpotterCode with Cursor

. To add the MCP server URL to your Cursor settings, go to **Cursor Settings** > **Tools and MCP**. Cursor opens the `mcp.json` file.
. Add the SpotterCode MCP Server URL as a remote MCP server. For information about configuring MCP servers in Cursor, refer to the link:https://cursor.com/docs/context/mcp[Cursor Documentation, window=_blank].
+
[source,JSON]
----
{
"mcpServers": {
"SpotterCode": {
"url": "https://spottercode.thoughtspot.app/mcp"
}
}
}
----
. Click *Save* and close the `mcp.json` file. This will install the SpotterCode MCP server and tools for the AI models on Cursor to execute.

== Integrate SpotterCode with Visual Studio Code

Although you can configure the MCP server in Visual Studio Code, to start a chat session with the AI agent, you'll need GitHub Copilot or a similar extension.

To add an MCP Server to Visual Studio Code, you can use the Extensions view, the `MCP: Add Server` command via command palette, or directly edit the `mcp.json` file in your workspace configuration.

[source,JSON]
----
{
"servers": {
"SpotterCode": {
"url": "https://spottercode.thoughtspot.app/mcp",
"type": "http"
}
}
}
----

After you add the MCP server URL, the SpotterCode MCP server will be available in the Extensions view. For more information about configuring MCP servers in Visual Studio Code, refer to link:https://code.visualstudio.com/docs/copilot/customization/mcp-servers[Visual Studio Code Documentation, window=_blank].

== Integrate SpotterCode with Claude Code
To enable SpotterCode in Claude Code, you can add the SpotterCode MCP server URL using the `claude mcp add` command via Claude CLI. If you are using Claude Desktop, you can add the URL directly to the Claude configuration JSON file:

[source,JSON]
----
{
"mcpServers": {
"SpotterCode": {
"url": "https://spottercode.thoughtspot.app/mcp",
}
}
}
----

For more information about adding MCP servers to Claude Code, see link:https://code.claude.com/docs/en/mcp[Claude Code Documentation, window=_blank].

== Verify the integration

To verify the integration:

. Open your application project in your IDE.
+
If the integration is successful, you'll see SpotterCode in the MCP servers list.

. Verify the available SpotterCode skills.
+
For example, Cursor shows the MCP skills of MCP connectors in the **Tools & MCP** page. Check if the xref:spottercode.adoc#_supported_skills[SpotterCode MCP skills] are listed under SpotterCode. As you hover over each skill, you can view the description and input schema used for agentic interactions. You can also disable the MCP skills that you don't want the AI model to use.

+
[div videoContainer]
--
video::./images/cursor_mcp-skills.mp4[width=100%,options="autoplay,loop"]
--

. Initiate a chat session and ask a question related to ThoughtSpot embedding, REST APIs, or the SDKs.
+
In the following example, a chat session with Cursor AI is initiated with the prompt, "I want to embed a ThoughtSpot Liveboard in my React application. Use the available tools to get this information and generate the embed code". Notice how the AI agent uses the SpotterCode skills to get the required information:
+
[div videoContainer]
--
video::./images/cursor-chat-session.mp4[width=100%,options="autoplay,loop"]
--

. Verify that the AI Agent is able to discover SpotterCode skills and is using these skills to generate a response.
. Review the response returned for your prompt and verify the results.
+
The following example shows how Cursor AI scaffolds the embed code using the SpotterCode skills. Notice that the AI agent identifies and lists the minimum configuration settings, such as the ThoughtSpot host URL, Liveboard ID, and authentication attributes, required to complete the embedding.

+
[div videoContainer]
--
video::./images/cursor-chat-session2.mp4[width=100%,options="autoplay,loop"]
--
. When you are prompted to provide additional information, specify these details to continue with the embedding as shown in the following example:

+
[div videoContainer]
--
video::./images/cursor-lb-embed.mp4[width=100%,options="autoplay,loop"]
--
. Try additional prompts such as adding custom styles, hiding UI menu actions, and more.

== Additional resources

* For prompt examples, see xref:spottercode-prompt-guide.adoc#_prompt_examples[Prompt examples and best practices].
* For troubleshooting tips and workarounds, refer to the xref:spottercode-prompt-guide.adoc#_troubleshooting_errors[Troubleshooting] section.


////
. If your IDE shows the step-by-step explanation of how the Agent how the AI reached its conclusion, you may see the following parameters. These parameters show the input schema of the MCP request to SpotterCode.
* `query` - User's request or question. For example, `how do I embed Liveboard`.
* `version` - Version of the SDK to use. Default is `latest`.
* `topK` - How many relevant documents to return for the query. Default is 5. The agent may increase or decreased the number to get the right answer.
* `symbolName` - Limiting search to a specific item, for example, `LiveboardEmbed`.
* `apiName` - The API node for finding request/response details.
* `additionalDocs` - To include more documentation for extra context, such as Java or TypeScript SDK guidance.

////







158 changes: 158 additions & 0 deletions modules/ROOT/pages/spottercode-prompt-guide.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
= SpotterCode prompting guide
:toc: true
:toclevels: 2

:page-title: How to use SpotterCode
:page-pageid: spottercode-prompting-guide
:page-description: This document provides best practices, prompt examples and troubleshooting guidance.

Prompting is an essential step when building embed code for ThoughtSpot integration or when exploring ThoughtSpot REST APIs using SpotterCode.

This guide provides prompting guidance and best practices to help you get the best results for a variety of use cases.

== Best practices and recommendations

* Provide clear, direct, and specific instructions. If you want a code sample as the output and nothing else, specify this in your prompt.
* Avoid multiple task requests in a single prompt. Break down your questions and precisely explain what you want.
* For precise results, use ThoughtSpot terminology, such as Liveboard, Spotter, visualization, and full application embedding.
* To receive specific answers and narrow down your request, mention the SpotterCode skill in instructions. For example, ask `How do I embed a ThoughtSpot page in my app? Use the available SpotterCode tools and skills to get this information`.
* Provide contextual information when asking a question and directing the AI model to perform an action. For example, describe the end goal of the task. If an action must be performed sequentially, use numbered lists or bullet points to ensure the AI agent completes the task as intended.
* Review each response thoroughly. For best results, use the advanced AI models.
* Do not include sensitive or confidential data in prompts.
* Provide additional details and clarifications in the next prompt if you are not getting the desired response.
* Do not rely on SpotterCode to infer business logic that isn’t explicitly defined in the documentation or the SDK.

== Prompt examples

For accurate and consistent responses, improve your prompts.

=== Embedding ThoughtSpot
Refer to the prompt examples in the following table for ThoughtSpot embedding use cases:

[width="100%" cols="4,4" role="copy-cell-table prompt-guidance-table"]
[options='header']
|=====
|Vague prompt|Clear prompt
|How do I embed ThoughtSpot?| I want to embed full ThoughtSpot application in my app. Use the available tools to get this information and generate the embed code.
|I want to use ThoughtSpot in my app.| I want to embed a ThoughtSpot Liveboard in my React application. Use the available tools to get this information and generate the embed code.
|Show me how to use the SDK. | I want to embed ThoughtSpot Spotter Search and AI analytics in my application. Use the 'get-visual-embed-sdk-reference' and 'get-developer-docs-reference' tools to get the information and code samples.
|Give me code for embedding analytics. | Provide an example of embedding the full ThoughtSpot application using AppEmbed.
|How do I add Search? | How do I use the SearchEmbed component to embed a search page with a pre-selected data source?
a|
Tell me how to start the SDK in my app.

Show me how to use the SDK | How do I initialize the ThoughtSpot Visual Embed SDK in a React application?
|What is the embed code for Liveboard? a| Use the SpotterCode tools and generate the embed code for a Liveboard in a React application +
Give me a code sample for embedding a ThoughtSpot Liveboard using the Visual Embed SDK.
|How do I add a chart in my app?| How do I embed a single chart or table from a ThoughtSpot Liveboard in my application?
|How do I use runtime filters? | Show a code example for embedding a Liveboard with two runtime filters: one for 'Region' set to 'Midwest' and one for 'item type' set to 'Jackets', using the Visual Embed SDK.
|Add an event hook to Liveboard. | Generate a React component that uses the ThoughtSpot embed SDK to display a Liveboard and add an event to trigger filter updates.
|Can I customize the embed?| Fetch the documentation for the LiveboardEmbed class and summarize the available customization options.
a|How do I update my code? +

Update to new version
|Update my embed code using the latest Visual Embed SDK version and highlight any breaking changes from the documentation.
a| Show me an example with filters +

Add filters to my embed
a|
* List all supported runtime filter operators and provide code examples for each using the SDK.
* Show how to apply an OR condition in runtime filters for product names containing 'bag' or 'jackets' in the embed code.
* Explain how to embed a Liveboard with a date filter using epoch time format, and show a code sample.
|Give me code for embedding analytics | Provide a code snippet to embed Spotter and pass a search query string as a prop
a| Change the Liveboard layout +
Make my embed dynamic
a| Show how to customize the Liveboard breakpoint width and explain the impact. +
Show me how to customize the layout of charts in the embedded Liveboard.
|Add custom styles to buttons| Change the background color of the Call To Action (CTA) buttons in the embed view to Cerulean blue (#2A52BE).
|=====

=== ThoughtSpot REST APIs

If using ThoughtSpot REST APIs in application workflows, consider using the examples listed in the following table:

[width="100%" cols="4,4" role="copy-cell-table prompt-guidance-table"]
[options='header']
|=====
|Vague prompt|Clear prompt
|How do I get the dashboards via API| How do I get a list of my Liveboards via ThoughtSpot REST API?
a| Show me how to connect to the API +

Show me how to use the API a|
Show a cURL example for authenticating to ThoughtSpot REST API v2.0 using OAuth +

Generate a POST request to /api/rest/2.0/metadata/search, including required headers and body.
|How do I add a user using API? a|
How do I create a new user with admin privileges via REST API? Provide the endpoint, method, and sample payload.
|Get data from a chart via API| Generate a REST API request example to fetch data from a specific chart in a Liveboard.
|What do I need to include in my API request? | What headers are required for a REST API call to ThoughtSpot? List and explain each.
|How do I see new actions in my app? | How do get a list of custom actions added in my embed via REST API?
|=====

== Troubleshooting errors
This section lists the common error scenarios, root causes, and recommended actions for troubleshooting errors related to SpotterCode integration. If the error persists, contact ThoughtSpot Support for further assistance.

=== SpotterCode is not responding or failing to load

Possible causes::
- SpotterCode is not installed or enabled.
- Incorrect MCP Server URL or errors in the MCP configuration file.
- SpotterCode server is not reachable.

Recommended actions::
- Ensure the SpotterCode is properly installed and enabled in your IDE.
- Verify whether the SpotterCode MCP server is reachable. If the server is not reachable, contact ThoughtSpot Support.
- Verify whether your organization's network/firewall settings are blocking communication.
- Exit and restart your application and try connecting again.

=== Unable to start a chat with SpotterCode

Possible causes::
- Development environment non-AI-native or not AI-enabled.

Recommended actions::
- If your IDE is not AI-native, try installing an extension, such as Copilot.
- Check if your environment has access to AI models.
- Start a chat session and specify the Agent to use SpotterCode skills. If the issue persists, contact your application administrator.

=== Slow response time

Possible causes::

- The prompt is complex, involves multiple actions, or includes a broader context, resulting in a longer search and processing time.
- High server load or network latency can further delay the response.

Recommended actions::
- Make your prompt as specific as possible. Specify the SDK version, the exact component, and the desired output. For best results, break down complex requests into smaller, sequential prompts. Refer to xref:spottercode-prompt-guide.adoc#_prompt_examples[prompt examples] and xref:spottercode-prompt-guide.adoc#_best_practices_and_recommendations[best practices] for tips.
- Try using a different AI model and review.
- Reset the chat session and try it again.

=== Incorrect or irrelevant response

Possible causes::
- The AI Agent is not using the right skills or the input schema of the MCP skills efficiently.
- The prompt input is complex or ambiguous.

Recommended actions::
- Check the response generation flow to see the query parameters used by the AI Agent in its MCP request.
- Refine your query to be more specific. Refer to the best practices and Prompt examples recommended by ThoughtSpot.
- Choose a different AI model and review the results.

=== Errors in code samples due to version mismatch

Possible causes::
- SpotterCode used a different version for code generation.
- No version was specified in the prompt.

Recommended actions::
- SpotterCode uses the latest version of the SDK by default. If you'd like to use a different version, specify the version in your prompt.
- Review API and SDK changelog in the documentation for feature deprecation and breaking changes.

=== SDK client context mismatch

Possible causes::
SpotterCode couldn't determine the SDK content for your application or client.

Recommended actions::
Although the AI Agent on your IDE is capable of finding relevant information for your project context, we recommend stating the client environment and required SDK client library clearly in the prompt.

Loading