Skip to main content
Glama
pessini

Sales MCP Server

by pessini

LangGraph MCP Prefab UI Demo

This is the companion repository for the blog post Interactive LangGraph UIs with MCP Apps: Serving Inline Cards for Human-in-the-Loop Agents.

The goal of this demo is to show a LangGraph skills agent inside an MCP client with an inline Prefab UI. The example uses a sales analytics skill, a local SQLite database, and human-in-the-loop review buttons.

Prerequisites

  • Python 3.11+

  • uv

  • Make, curl, and tar

  • An OpenAI API key, unless you configure the demo to use Ollama

  • An MCP client that can launch a stdio server and render MCP Apps UI

Related MCP server: querywise-mcp

Setup

Install the Python dependencies:

make install

Create your local environment file:

cp .env.example .env

Edit .env and set:

OPENAI_API_KEY=sk-...

Seed the demo database:

make seed

Run

Start the sales MCP server:

make sales-mcp

In a second terminal, start the LangGraph skills agent:

make skills-agent

Keep both terminals running while you use the demo.

MCP Client

Add this server command to your MCP client config:

uv --directory /ABSOLUTE/PATH/TO/langgraph-mcp-prefab-ui run python -m langgraph_prefab_ui.prefab_server

Use these environment variables for that MCP server:

LANGGRAPH_URL=http://127.0.0.1:2024
LANGGRAPH_ASSISTANT_ID=skills_agent

Replace /ABSOLUTE/PATH/TO/langgraph-mcp-prefab-ui with the path to your clone.

Then ask your MCP client:

Show 2025 enterprise sales and investigate anomalies.

You should see an inline dashboard with the sales trend, source rows, and Investigate / Dismiss buttons.

Notes

  • Start make sales-mcp before make skills-agent.

  • The first make skills-agent run downloads the pinned skills-agent release into .skills-agent/.

Available Tools

3 tools
ask_agentA

Ask the LangGraph skills agent a natural-language question and render its response as a Prefab dashboard card.

Call this tool whenever the user asks a question that matches any of the loaded skills below — even when the user does not explicitly say "use the skills agent". Do not answer from memory or invent data; route the question through this tool so the agent can query the live database, detect anomalies, and pause for human review when needed.

Loaded skills:

  • sales-analytics: Answer questions about monthly sales performance from the local sales database. Query revenue, deals, and gross margin by year/region/segment; detect significant revenue drops; escalate anomalies for human review. Keywords: sales, revenue, deals, margin, anomaly, region, segment, enterprise, mid-market, EMEA, North America, monthly performance.

Pass an optional thread_id to continue a prior conversation; omit for a fresh thread. The agent runs on LangGraph at LANGGRAPH_URL and returns either a final answer or a paused state with an Investigate / Dismiss review card.

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYes
thread_idNo

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses the tool's behavior: it queries a live database, detects anomalies, may pause for human review, and returns either a final answer or a review card. It also specifies the execution environment (LangGraph at LANGGRAPH_URL). No contradictions with annotations (none provided).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with the purpose front-loaded, followed by usage guidelines and specific skill details. While the list of skills and keywords is somewhat lengthy, it is relevant and aids the agent in matching questions. Every sentence serves a purpose, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity, two parameters, and no output schema or annotations, the description provides essential context: how the agent works, the nature of results, and the optional thread_id. It could mention error handling or response structure in more detail, but overall it is complete enough for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema description coverage is 0%, the description adds meaning to both parameters: it explains the `question` as a natural-language query and `thread_id` as optional for continuing a conversation. This compensates for the lack of parameter descriptions in the schema, though more detail on `question` format would strengthen it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: asking a natural-language question to the LangGraph skills agent and rendering the response as a dashboard card. It specifies the loaded skills and differentiates from siblings by focusing on question-answering rather than review actions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided on when to call this tool, including that it should be used even if the user does not explicitly mention the agent. It advises against answering from memory and instructs routing to the agent. However, it does not explicitly exclude scenarios or mention alternatives beyond the listed skills.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_review_statusB

Return {reviewed, decision_result} for a thread.

Called from the dashboard's on_mount so the rendered card stays in sync with the latest LangGraph checkpoint after iframe remount.

ParametersJSON Schema
NameRequiredDescriptionDefault
thread_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully cover behavioral traits. It only describes the return value and the calling context, but fails to disclose side effects (e.g., whether it modifies state), error conditions, idempotency, or permission requirements. For a tool that likely performs a read operation, this omission is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences with no extraneous information. It is front-loaded with the key return value and the usage context, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (not shown but flagged as present), the description does not need to detail return values. It provides the calling context (dashboard on_mount) and purpose (sync with checkpoint). However, it lacks details on error handling, performance considerations, or any constraints, which would be helpful for completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one required parameter 'thread_id' with no description (schema coverage 0%). The tool description does not explain the semantics of 'thread_id' beyond referring to 'a thread'. An agent needs to know what a valid thread_id looks like (e.g., format, source) to use it correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a tuple of {reviewed, decision_result} for a thread, which is a specific verb and resource. However, it does not explicitly differentiate from sibling tools 'ask_agent' and 'resume_review', though the difference is implied by the context (dashboard sync vs. agent interaction or review continuation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a specific usage context ('Called from the dashboard's on_mount...') and mentions the reason (sync with LangGraph checkpoint after iframe remount). However, it does not explicitly state when not to use the tool or mention alternative tools for different scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

resume_reviewB

Resume a paused thread with the human's decision.

Returns a Prefab component tree (NOT a PrefabApp) so the dashboard's Slot("decision_result") can inject it inline without a remount.

ParametersJSON Schema
NameRequiredDescriptionDefault
decisionYes
thread_idYes
request_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the return type (Prefab component tree) and its injection behavior, which adds value beyond the schema. However, without annotations, it lacks information on permissions, idempotency, side effects, or error conditions, leaving gaps in behavioral understanding.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, free of redundancy, and efficiently conveys the core purpose and a key behavioral detail (return type) without wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the three required parameters and no annotations, the description is incomplete: it omits parameter explanations, usage context, and behavioral details beyond the return type. The presence of an output schema partially mitigates the return explanation but does not address other gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has three required parameters with 0% description coverage, and the description does not elaborate on any parameter. The description thus adds no meaning beyond the schema, failing to compensate for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Resume a paused thread') and the resource (thread) involved. It distinguishes itself from siblings 'ask_agent' and 'check_review_status' by focusing on resumption with a human decision, which is a distinct operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a human decision is available to resume a paused thread, but it does not provide explicit when-to-use or when-not-to-use guidance, nor does it mention alternatives beyond the implicit sibling differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.9/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: ask_agent for querying the agent, resume_review for resuming paused threads, and check_review_status for querying thread state. No overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (ask_agent, resume_review, check_review_status), making them predictable and clear.

Tool Count5/5

Three tools is well-suited for a focused agent interface server. Each tool covers a core interaction step (ask, resume, check status) without unnecessary extras.

Completeness5/5

The tool set provides full lifecycle support for the sales analytics agent: asking questions, handling human reviews, and checking status. No obvious gaps for the intended use case.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables natural language interaction with heterogeneous databases (MySQL and PostgreSQL) for CRUD operations across customer, product, and sales data with intelligent query routing and visualization capabilities.
  • A
    license
    A
    quality
    C
    maintenance
    Query SQL databases (SQLite, PostgreSQL, BigQuery, Databricks) in natural language through a business semantic layer — glossary, metrics, and a data dictionary grounded against your real schema. Read-only by default, with an embedded SQLite + sqlite-vec metadata store and no external infra required.
    25
    2
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI to query a business database for customers, orders, and revenue using natural language through safe, well-defined tools.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pessini/langgraph-mcp-prefab-ui'

If you have feedback or need assistance with the MCP directory API, please join our Discord server