Prerequisites
- An Ocient MCP Server connected to an Ocient System. For setup steps, see Ocient MCP Server.
- An MCP client, such as an AI assistant or an AI-powered code editor, that you configure to use the server.
- A database user with privileges to create tables, create data pipelines, and create MCP tools in the target schema.
- Source data in a supported data pipeline source, such as an S3 bucket.
1
Step 1: Verify the Connection.
Ask the agent a simple metadata question.Prompt
show_schemas tool and lists the user-defined schemas that your privileges allow you to see. A successful response confirms that the MCP client, the server, and the database connection all work.2
Step 2: Explore the Schema.
Before the agent writes SQL statements, it grounds itself in your actual metadata. Ask about the tables and columns you plan to analyze.Prompt
show_tables and show_columns system tools to retrieve the table list and the column names, data types, and nullable properties. Because the agent reads the real metadata instead of guessing, its generated SQL statements reference correct object names and handle data types correctly. The agent can also query the information_schema views with the execute_statement tool to confirm additional type details.3
Step 3: Load the Data.
Describe the data you want to load and where it lives.Prompt
CREATE TABLE SQL statement with appropriate data types, and generates a CREATE PIPELINE SQL statement to load the files. The agent executes both statements with the execute_statement tool, and then starts the load.SQL
information_schema.pipeline_status, and reports errors from the sys.pipeline_errors system catalog table if any records fail. For details about data pipelines, see Load Data.4
Step 4: Analyze the Data.
Ask analytical questions in natural language.Prompt
SQL
execute_statement tool returns the Ocient error message as a descriptive tool error, and the agent corrects the query and retries. You can iterate conversationally, for example, ask the agent to filter by date range, join reference tables, or apply machine learning model functions from Machine Learning in Ocient.5
Step 5: Encapsulate the Analysis as an MCP Tool.
After you settle on an analysis that you want to reuse, ask the agent to wrap it in a user-defined MCP tool.Prompt
CREATE MCP TOOL SQL statement that stores the parameterized query as a metadata object in the database. From this point on, the MCP server automatically discovers the new tool and exposes it as analytics_busiest_hours, and any teammate or AI agent connected to the same Ocient System can invoke it by name, without knowing the underlying query logic. For an overview, see User-Defined MCP Tools. For the complete CREATE MCP TOOL syntax, see Model Context Protocol Tools.6
Step 6: Generate a Report.
Ask the agent to summarize the results.Prompt

