detect_objects
Identify specific objects in camera feeds using computer vision. Specify what to look for (like 'red boxes' or 'people') to get detection results for robotic applications.
Instructions
Run computer vision to detect objects
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | What to look for (e.g., "red boxes", "people") | |
| camera_id | No | Camera to use (optional) |
Implementation Reference
- server.js:354-370 (handler)The detectObjects function handles the 'detect_objects' tool execution, making a POST request to an external perception API.
async detectObjects(args) { const response = await axios.post( `${API_BASE}/api-perception.php`, { action: 'detect_objects', query: args.query, camera_id: args.camera_id, }, { headers: { 'X-API-Key': API_KEY } } ); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, - server.js:146-163 (schema)The schema for the 'detect_objects' tool defines the input structure including 'query' and 'camera_id'.
{ name: 'detect_objects', description: 'Run computer vision to detect objects', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'What to look for (e.g., "red boxes", "people")', }, camera_id: { type: 'string', description: 'Camera to use (optional)', }, }, required: ['query'], }, }, - server.js:200-201 (registration)The 'detect_objects' tool is registered within the CallToolRequestSchema handler switch block.
case 'detect_objects': return await this.detectObjects(args);