# SenseCore Platform MCP

> SenseCore Platform provides 10 tools for managing industrial-grade AI infrastructure via MCP. Use it to run chat completions with SenseTime models, list and inspect available foundation models, monitor compute node availability, and track long-running inference task status directly from your agent.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** sensecore, sensetime, sensechat, llm-api, compute-resources, gpu-orchestration, industrial-ai

## Description

**SenseCore Platform** gives your AI agent the muscle it needs to run serious industrial-grade model workflows through MCP. You're not just connecting to an API; you're getting full control over the entire lifecycle, from defining a new assistant to tracking complex background jobs. Here’s what you can do with these tools.

### Orchestrating Model Conversations

When your agent needs to talk, it uses `chat_completions` to send messages through SenseCore's large language model engine. You pass in a message and the specific SenseTime model you want to use; the engine handles the rest. If you need to maintain context—which you always do—you first initialize a brand new conversation using `create_thread`. That gives your agent an empty history it can build on. Then, before running anything complex, you'll use `list_messages` to pull the entire message history for that thread ID so your agent remembers everything that was said. To add content at any point, even if you just want to inject a document reference or correct a previous turn, you call `create_message`, appending it directly to that existing conversation context. When everything is set up—the thread exists, the messages are there, and the model is ready—you kick off the core action with `create_run`. This tool tells your agent to execute the defined assistant against the current message thread, initiating the full workflow run.

### Managing AI Assistant Lifecycles

You don't just want a random chat; you need a structured process. That’s where dedicated assistants come in. You can set up and define a completely new, specialized AI assistant using `create_assistant`. This defines the rules for multi-step or guided conversations within your project. Once it's defined, if you need to know what kind of assistant is already running around, you run `list_assistants` to get a full roster of everything configured in your account. If you want deep technical specs on a specific helper—like how many steps it has or which model it defaults to—you use `get_assistant_details` and pass in its ID. These tools let you build, manage, and audit the intelligence layer before any messages are even sent.

### Discovering Model Specs and Files

If you don't know exactly what models you have access to, you run `list_models`. This gives you a complete catalog of every available SenseNova foundation model and tracks their specific versions. It’s your source of truth for what engines are running. Furthermore, if your workflow involves data—whether it’s reference documents or user uploads—you can use `list_files` to pull a list of all files uploaded to the current workspace or thread context, ensuring your agent knows exactly what data it's working with before it processes anything.

### Monitoring and Tracking Jobs

Running an LLM isn't always instant. Sometimes you're talking about huge batches of inference or long training runs that take forever. You don't want to stare at a loading bar all day, so you use `get_run_status`. This checks the current status—whether it's running, if it failed, or if it completed successfully—for any complex assistant run you started earlier. It keeps you in the loop without having to manually poll for updates.

In short, you get a complete operational view: you can define your workflow with dedicated assistants, pull the specific models and data files needed, start the conversation thread, kick off the job, and then constantly monitor its status until it's done. It’s comprehensive control over everything running on SenseCore.

## Tools

### create_assistant
Sets up and defines a new, dedicated AI assistant within your project.

### get_assistant_details
Retrieves the full configuration settings for an existing AI assistant by its ID.

### create_message
Adds content to an existing conversation thread for historical context or continuation.

### chat_completions
Sends a message through the SenseCore large language model engine.

### create_run
Starts executing a defined assistant against a specific message thread, initiating the core workflow.

### create_thread
Initializes a brand new, empty conversation history that can accept messages and runs.

### get_run_status
Checks and returns the current status (running, failed, complete) of a previously started assistant run.

### list_assistants
Lists all AI assistants that have been configured for use within your account's project.

### list_files
Retrieves a list of files that have been uploaded to the current workspace or thread context.

### list_messages
Fetches the complete message history for a given conversation thread ID.

### list_models
Gets a list of all available SenseNova foundation models and their versions.

## Prompt Examples

**Prompt:** 
```
Chat with SenseChat-5 and ask 'Compare the features of traditional neural networks and transformers'.
```

**Response:** 
```
Connecting to SenseCore engine... SenseChat-5 responded: 'While both are neural architectures, transformers use self-attention mechanisms to process sequential data in parallel, unlike RNNs...' Would you like me to go deeper into self-attention?
```

**Prompt:** 
```
List all active models in project 'Research_AI_2024'.
```

**Response:** 
```
Fetching model list for project 'Research_AI_2024'... I found 3 active models: 1. SenseChat-5 (Foundation), 2. SenseVision (Multimodal), 3. SenseAudio (Specialized). Which one would you like to interact with?
```

**Prompt:** 
```
What is the health status of service ID 'svc_gpu_999'?
```

**Response:** 
```
Querying service health metrics... Service 'svc_gpu_999' is currently 'Healthy'. Uptime: 99.98%, P99 Latency: 45ms, and Request Success Rate: 100% over the last 60 minutes.
```

## Capabilities

### Orchestrate Model Conversations
Initiate chat completions using specific SenseTime foundation models while maintaining thread history and context.

### Manage AI Assistant Lifecycles
Define, list, and interact with dedicated AI assistants to structure multi-step or guided conversations.

### Discover Model Specs
Retrieve a complete catalog of foundation models, including technical details and versioning information.

### Track Compute Utilization
Check the health metrics, latency (P99), and overall uptime for specific model services or GPU clusters.

### Monitor Background Jobs
List and check the status of complex, long-running tasks like training runs or large inference batches.

## Use Cases

### Building a Customer Support Bot
A support bot needs memory. The agent first calls `create_thread` and then uses `list_messages` to pull the last 10 turns of chat history. It passes this context payload, along with the user's query, to `chat_completions`. The result is a highly contextual reply that references past details.

### Automating Model Integration
An ML team needs to test three new models. Instead of calling endpoints individually, the agent uses `list_models` to validate all available options first. It then chooses a specific model (e.g., SenseChat-5) and uses `get_assistant_details` to confirm its configuration before running any tests.

### Debugging Failed Batch Jobs
A large data batch job fails in the background. The agent calls `create_run` and then repeatedly hits `get_run_status`. This gives an immediate status update, telling the engineer exactly which step failed (e.g., 'Quota Exceeded') so they can fix it without manual console diving.

### Creating a Multi-Step Workflow
A user needs to process a document through several steps. The agent first defines the entire flow using `create_assistant`. Then, when the user is ready, it calls `create_run` on that assistant template, allowing SenseCore to handle all the internal logic.

## Benefits

- You don't have to guess if a job finished. Use `get_run_status` to check the real-time status of any long-running inference task, preventing stale data issues.
- Stop rebuilding conversations from scratch. The combination of `create_thread`, `list_messages`, and `chat_completions` lets you manage full, persistent chat history automatically.
- It's not just about chatting—it's about structure. Define specific workflows using `create_assistant` before running them with `create_run`. This makes the system repeatable.
- Model discovery is fast. Instead of guessing model names, call `list_models` to get a definitive list and technical specs for every SenseNova version available.
- Resource checks are built-in. You can monitor compute node availability and track quota usage directly via the platform's tools before your agent even tries to run.
- Your code doesn't fail when context is missing. By using `list_messages`, you ensure your agent always has access to the full thread history, keeping conversations coherent.

## How It Works

The bottom line is you plug in your credentials once, and your AI client handles all the complex orchestration calls for model control and resource monitoring after that.

1. Subscribe to this server. Then, log into the SenseCore Console to get your API Key, Secret Key, Organization ID, and Project ID.
2. Insert those credentials into your AI client's configuration fields. This authenticates your agent against the SenseTime infrastructure.
3. Your agent can now call tools like `list_models` or `chat_completions`, executing operations directly against the managed resources.

## Frequently Asked Questions

**How do I check if a long-running inference job failed using get_run_status?**
You monitor the run status by repeatedly calling `get_run_status` with the run ID. If the status returns 'failed,' you'll also get error details explaining what caused the failure, letting you fix it fast.

**Do I need to use create_assistant before chat_completions?**
No, not always. `chat_completions` works for simple chats. But if your conversation needs specific tools or a defined process (like data extraction), you should define it first using `create_assistant`.

**What is the difference between create_thread and list_messages?**
`create_thread` makes an empty container for history. You call `list_messages` later to pull the actual content that has been added to that thread ID.

**How do I get model specs without listing all models first?**
You use `list_models` to get a list of available names. Then, you can retrieve detailed specifications for any specific model name using the platform's dedicated inspection tools.

**Before I can use `list_assistants`, what credentials do I need for my AI client?**
You must provide your API Key, Secret Key, and Organization ID. These are necessary authentication tokens that prove your agent has access to the SenseCore infrastructure.

**If I hit rate limits while using `chat_completions`, how should my agent handle it?**
Your client must implement exponential backoff and retry logic. The API will return a specific status code (e.g., 429) when you exceed the defined request quota.

**How do I manage files that are attached to a conversation using `list_files`?**
`list_files` retrieves all file IDs associated with your current project or thread context. You'll need the specific file ID when calling other tools, like sending messages.

**I used `list_models` and saw 20 models; how do I know which one is best for my task?**
`list_models` only gives you names. For specific technical requirements—like parameter support or latency guarantees—you must call `get_assistant_details` using the model's ID.

**Can I automatically list all available models in my SenseCore project?**
Yes! Use the `list_models` tool. Your agent will retrieve a complete list of all SenseTime foundation models and specialized variants currently active in your account.

**How do I check the health status of my deployed model services?**
Use the `get_service_health` tool with the specific Service ID. The agent will return real-time metrics on availability, throughput, and average latency.

**Can I monitor GPU resource utilization via the AI agent?**
Yes! The `get_resource_usage` tool retrieves granular metrics on compute node utilization and remaining quota for your specific project environment.