Skip to main content
Glama

extract_contact_from_image

Idempotent

Extracts contact details from PNG, JPG, WEBP, or GIF images and optionally saves them to Google Contacts.

Instructions

Load a PNG, JPG/JPEG, WEBP, or GIF image (from a local file path, file:// URL, data URI, or base64 string) to extract contact details. Uses MCP client sampling or a configured Vision API if available; otherwise returns the image content block directly to the calling harness (Claude, ChatGPT, or Gemini) so the harness can read the image and call upsert_contact.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "imageSource": "<imageSource>"
    },
    "name": "extract_contact_from_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
autoSaveNoIf server-side extraction succeeds, automatically upsert the contact into Google Contacts (default: true)
mimeTypeNoOptional MIME type override (e.g. 'image/png', 'image/jpeg')
imageSourceYesPath to local .png/.jpg/.webp file, file:// URL, data:image/...;base64 URI, or base64 string
additionalContextNoOptional notes or context to attach or guide extraction
setAsContactPhotoNoIf true, also set the image as the contact's avatar photo (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is already covered. The description adds genuinely new behavioral context: extraction may go through MCP sampling or a Vision API, and if neither is available it returns the raw image block so the calling harness performs the read. It does not mention that autoSave may write to Google Contacts beyond what the schema's autoSave field states.

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?

Two sentences, front-loaded with the accepted formats and sources, then the execution path and fallback. No filler and the fallback contract is stated compactly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given five parameters, no output schema, and full schema coverage, the description supplies the missing pieces: how extraction is attempted and what happens when no vision capability exists. It could be more explicit about which parameters only apply on the server-side path, but nothing critical to invoking the tool is absent.

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?

Schema coverage is 100%, so all five parameters are already documented, and the description adds little parameter-specific detail beyond restating that a source may be a path, file:// URL, data URI, or base64. That is a baseline-3 situation where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('extract contact details' from an image) and enumerates accepted formats and input sources. It is clearly distinguished from upsert_contact and parse_and_upsert_contact by making image ingestion the defining action.

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

Usage Guidelines4/5

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

It clearly explains the input-source types accepted and the fallback flow, and explicitly names upsert_contact as the downstream step, giving the agent a routing picture. It stops short of explicit when-not guidance (e.g., use parse_and_upsert_contact for text) so it is strong but not exhaustive.

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