Skip to main content
Glama
Prooflie

Proofly MCP Integration

by Prooflie

get-face-details

Extract detailed information about a specific detected face in an image to verify authenticity and analyze facial characteristics.

Instructions

Get detailed information about a specific face detected in an image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionUuidYesSession UUID from the analyze-image result.
faceIndexYesIndex of the face to get details for (starting from 0).
formatNoOutput format.text

Implementation Reference

  • The handler function that executes the logic for the 'get-face-details' tool. It fetches the full analysis result for the given session UUID, validates the face index, extracts the specific face data, and formats the output as JSON or human-readable text.
    async handleGetFaceDetails(params) {
      logInfo("Handling get-face-details with params:", params);
      const { sessionUuid, faceIndex, format = 'text' } = params;
    
      if (!sessionUuid || typeof faceIndex !== 'number' || faceIndex < 0) {
        throw new McpError(ErrorCode.InvalidParams, "Missing or invalid sessionUuid or faceIndex parameter");
      }
    
      try {
        logInfo(`Fetching full analysis data for UUID ${sessionUuid} to get face details`);
        const resultResp = await axios.get(`${PROOFLY_CONFIG.baseUrl}/api/${sessionUuid}`);
        const analysisResult = resultResp.data;
        logInfo(`Full analysis data for ${sessionUuid}:`, analysisResult);
    
        if (!analysisResult.faces || faceIndex >= analysisResult.faces.length) {
          throw new McpError(ErrorCode.NotFound, `Face with index ${faceIndex} not found in session ${sessionUuid}. Total faces: ${analysisResult.faces ? analysisResult.faces.length : 0}.`);
        }
    
        const specificFace = analysisResult.faces[faceIndex];
    
        if (format === 'json') {
          return { content: [{ type: "text", text: JSON.stringify(specificFace, null, 2) }] }; 
        } else {
          // Format only a single face
          let output = `**Details for Face ${faceIndex + 1} (Session: ${sessionUuid}):**\n`;
          const faceVerdict = getVerdict(specificFace.ansamble);
          output += `* Verdict: **${faceVerdict}**\n`;
          if (typeof specificFace.ansamble !== 'undefined' && specificFace.ansamble !== null) {
           output += `* Probability "real": ${(specificFace.ansamble * 100).toFixed(2)}%, "fake": ${(100 - specificFace.ansamble * 100).toFixed(2)}%\n`;
          }
          if (specificFace.is_real_model_1 !== undefined) {
            output += `* Individual model results:\n`;
            for (let i = 1; i <= 10; i++) {
              if (specificFace[`is_real_model_${i}`] !== undefined) {
                output += `  - Model ${i}: ${(specificFace[`is_real_model_${i}`] * 100).toFixed(2)}%\n`;
              }
            }
          }
          if (specificFace.face_path) {
            let faceImageUrl = `${PROOFLY_CONFIG.baseUrl}${specificFace.face_path}`;
            if (faceImageUrl.includes('ai./')) {
              faceImageUrl = faceImageUrl.replace('ai./', 'ai/');
            }
            output += `* Face image URL: ${faceImageUrl}\n`;
          }
          return { content: [{ type: "text", text: output }] };
        }
    
      } catch (error) {
        logError("Error in handleGetFaceDetails:", error.message);
        if (error.response) {
          logError("Error response data:", error.response.data);
          logError("Error response status:", error.response.status);
        }
        if (error.response && error.response.status === 404) {
          throw new McpError(ErrorCode.NotFound, `Session with UUID ${sessionUuid} not found when fetching face details.`);
        }
        throw new McpError(ErrorCode.ServerError, `Failed to get face details: ${error.message}`);
      }
    }
  • Input schema defining the parameters for the 'get-face-details' tool: sessionUuid (string, required), faceIndex (number, required), and optional format.
    inputSchema: {
      type: "object",
      properties: {
        sessionUuid: { type: "string", description: "Session UUID from the analyze-image result." },
        faceIndex: { type: "number", description: "Index of the face to get details for (starting from 0)." },
        format: { type: "string", enum: ["json", "text"], default: "text", description: "Output format." },
      },
      required: ["sessionUuid", "faceIndex"],
    },
  • server.js:221-233 (registration)
    Registration of the 'get-face-details' tool in the tools array provided to ListToolsRequest handler.
    {
      name: "get-face-details",
      description: "Get detailed information about a specific face detected in an image.",
      inputSchema: {
        type: "object",
        properties: {
          sessionUuid: { type: "string", description: "Session UUID from the analyze-image result." },
          faceIndex: { type: "number", description: "Index of the face to get details for (starting from 0)." },
          format: { type: "string", enum: ["json", "text"], default: "text", description: "Output format." },
        },
        required: ["sessionUuid", "faceIndex"],
      },
    },
  • server.js:249-250 (registration)
    Registration of the tool handler dispatch in the switch statement for CallToolRequest.
    case "get-face-details":
      return await this.handleGetFaceDetails(args);
  • Helper function used by the get-face-details handler to convert probability to a human-readable verdict.
    function getVerdict(probability) {
      if (probability === null || typeof probability === 'undefined') return "Uncertain (no score)";
      if (probability > 0.8) {
        return "Likely Real";
      } else if (probability < 0.2) {
        return "Likely Fake";
      } else {
        return "Uncertain";
      }
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 the tool retrieves information, implying a read-only operation, but doesn't cover aspects like authentication needs, rate limits, error handling, or what 'detailed information' includes (e.g., attributes, confidence scores). This leaves significant gaps for a tool with no structured safety hints.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it highly concise and well-structured for quick comprehension.

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 tool's complexity (involves session management and face indexing), lack of annotations, and no output schema, the description is incomplete. It doesn't explain the relationship with sibling tools, what 'detailed information' entails, or behavioral traits, making it inadequate for full contextual understanding.

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 description doesn't add any parameter-specific details beyond what the input schema provides. Since schema description coverage is 100%, with clear documentation for all parameters (sessionUuid, faceIndex, format), the baseline score of 3 is appropriate—the schema does the heavy lifting, and the description doesn't compensate or enhance parameter understanding.

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 action ('Get detailed information') and the resource ('about a specific face detected in an image'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'analyze-image' or 'check-session-status', which might also involve face-related operations, so it doesn't reach the highest score.

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 prerequisites (e.g., needing a session from 'analyze-image'), exclusions, or how it complements sibling tools, leaving usage context unclear.

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

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/Prooflie/mcp'

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