Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYesWhat to look for (e.g., "red boxes", "people")
camera_idNoCamera to use (optional)

Implementation Reference

  • 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),
          },
  • 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);

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/RedCiprianPater/mcp-server-robotics'

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