Skip to main content
Glama
fourcolors

Omi MCP Server

by fourcolors

create_omi_conversation

Generate Omi conversations by inputting text, metadata, and optional geolocation. Designed for AI assistants to store and manage user interactions via the Omi MCP Server.

Instructions

Creates a new Omi conversation with text content and metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
finished_atNoWhen the conversation/event ended in ISO 8601 format. Optional.
geolocationNoLocation data for the conversation. Optional object containing latitude and longitude.
languageNoLanguage code (e.g., "en" for English). Optional, defaults to "en".en
started_atNoWhen the conversation/event started in ISO 8601 format. Optional.
textYesThe full text content of the conversation
text_sourceYesSource of the text content. Required. Options: "audio_transcript", "message", "other_text".
text_source_specNoAdditional specification about the source. Optional.
user_idYesThe user ID to create the conversation for

Implementation Reference

  • Handler function that constructs a POST request to the Omi API to create a new conversation with provided text and metadata.
    async ({ text, user_id, text_source, started_at, finished_at, language, geolocation, text_source_spec }) => {
    	try {
    		const url = `https://api.omi.me/v2/integrations/${APP_ID}/user/conversations?uid=${user_id}`;
    
    		// Construct the body with required parameters
    		const body: Record<string, any> = {
    			text,
    			text_source,
    			language,
    		};
    
    		// Add optional parameters only if they are defined
    		if (started_at) body.started_at = started_at;
    		if (finished_at) body.finished_at = finished_at;
    		if (geolocation) body.geolocation = geolocation;
    		if (text_source_spec) body.text_source_spec = text_source_spec;
    
    		log(`Creating conversation with URL: ${url}`);
    		log(`Request body: ${JSON.stringify(body)}`);
    
    		const response = await fetch(url, {
    			method: 'POST',
    			headers: {
    				Authorization: `Bearer ${API_KEY}`,
    				'Content-Type': 'application/json',
    			},
    			body: JSON.stringify(body),
    		});
    
    		log(`Response status: ${response.status}`);
    
    		if (!response.ok) {
    			const errorText = await response.text();
    			throw new Error(`Failed to create conversation: ${response.status} ${response.statusText} - ${errorText}`);
    		}
    
    		return {
    			content: [{ type: 'text', text: '{}' }],
    		};
    	} catch (error) {
    		log(`Error creating conversation: ${error}`);
    		throw new Error(`Failed to create conversation: ${error instanceof Error ? error.message : String(error)}`);
    	}
    }
  • Zod input schema defining parameters for creating an Omi conversation, including text, user_id, text_source, optional timestamps, language, geolocation, and text_source_spec.
    	text: z.string().describe('The full text content of the conversation'),
    	user_id: z.string().describe('The user ID to create the conversation for'),
    	text_source: z
    		.enum(['audio_transcript', 'message', 'other_text'])
    		.describe('Source of the text content. Required. Options: "audio_transcript", "message", "other_text".'),
    	started_at: z.string().optional().describe('When the conversation/event started in ISO 8601 format. Optional.'),
    	finished_at: z.string().optional().describe('When the conversation/event ended in ISO 8601 format. Optional.'),
    	language: z.string().default('en').describe('Language code (e.g., "en" for English). Optional, defaults to "en".'),
    	geolocation: z
    		.object({
    			latitude: z.number().describe('Latitude coordinate. Required when geolocation is provided.'),
    			longitude: z.number().describe('Longitude coordinate. Required when geolocation is provided.'),
    		})
    		.optional()
    		.describe('Location data for the conversation. Optional object containing latitude and longitude.'),
    	text_source_spec: z.string().optional().describe('Additional specification about the source. Optional.'),
    },
  • src/index.ts:227-292 (registration)
    Registration of the 'create_omi_conversation' tool on the MCP server using server.tool(), including description, input schema, and inline handler.
    server.tool(
    	'create_omi_conversation',
    	'Creates a new Omi conversation with text content and metadata',
    	{
    		text: z.string().describe('The full text content of the conversation'),
    		user_id: z.string().describe('The user ID to create the conversation for'),
    		text_source: z
    			.enum(['audio_transcript', 'message', 'other_text'])
    			.describe('Source of the text content. Required. Options: "audio_transcript", "message", "other_text".'),
    		started_at: z.string().optional().describe('When the conversation/event started in ISO 8601 format. Optional.'),
    		finished_at: z.string().optional().describe('When the conversation/event ended in ISO 8601 format. Optional.'),
    		language: z.string().default('en').describe('Language code (e.g., "en" for English). Optional, defaults to "en".'),
    		geolocation: z
    			.object({
    				latitude: z.number().describe('Latitude coordinate. Required when geolocation is provided.'),
    				longitude: z.number().describe('Longitude coordinate. Required when geolocation is provided.'),
    			})
    			.optional()
    			.describe('Location data for the conversation. Optional object containing latitude and longitude.'),
    		text_source_spec: z.string().optional().describe('Additional specification about the source. Optional.'),
    	},
    	async ({ text, user_id, text_source, started_at, finished_at, language, geolocation, text_source_spec }) => {
    		try {
    			const url = `https://api.omi.me/v2/integrations/${APP_ID}/user/conversations?uid=${user_id}`;
    
    			// Construct the body with required parameters
    			const body: Record<string, any> = {
    				text,
    				text_source,
    				language,
    			};
    
    			// Add optional parameters only if they are defined
    			if (started_at) body.started_at = started_at;
    			if (finished_at) body.finished_at = finished_at;
    			if (geolocation) body.geolocation = geolocation;
    			if (text_source_spec) body.text_source_spec = text_source_spec;
    
    			log(`Creating conversation with URL: ${url}`);
    			log(`Request body: ${JSON.stringify(body)}`);
    
    			const response = await fetch(url, {
    				method: 'POST',
    				headers: {
    					Authorization: `Bearer ${API_KEY}`,
    					'Content-Type': 'application/json',
    				},
    				body: JSON.stringify(body),
    			});
    
    			log(`Response status: ${response.status}`);
    
    			if (!response.ok) {
    				const errorText = await response.text();
    				throw new Error(`Failed to create conversation: ${response.status} ${response.statusText} - ${errorText}`);
    			}
    
    			return {
    				content: [{ type: 'text', text: '{}' }],
    			};
    		} catch (error) {
    			log(`Error creating conversation: ${error}`);
    			throw new Error(`Failed to create conversation: ${error instanceof Error ? error.message : String(error)}`);
    		}
    	}
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a creation operation, implying it's a write/mutation tool, but doesn't disclose any behavioral traits like permission requirements, rate limits, side effects, or what happens on success/failure. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for a creation tool, though it could potentially benefit from slightly more context given the lack of annotations and usage guidelines.

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 complexity (8 parameters, nested objects, no output schema, and no annotations), the description is insufficient. It doesn't explain what a successful creation returns, error conditions, or behavioral constraints. For a creation tool with multiple parameters and no structured safety hints, more descriptive context is needed to be complete.

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

Parameters3/5

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

The schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds minimal value beyond the schema by mentioning 'text content and metadata', which loosely maps to the 'text' and other fields. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 verb 'creates' and the resource 'new Omi conversation', specifying it includes 'text content and metadata'. This distinguishes it from sibling tools like 'read_omi_conversations' (read vs. create) and 'create_omi_memories' (conversation vs. memories). However, it doesn't explicitly differentiate from 'create_omi_memories' beyond the resource name.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over 'create_omi_memories' or whether it's for initial conversation creation versus updates. There's no context about prerequisites, dependencies, or typical use cases.

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

Install Server

Other Tools

Related 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/fourcolors/omi-mcp'

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