Skip to main content
Glama

Classify Contact

classify_contact
Idempotent

Classify a contact's job title into department, seniority level, and rank 1-12 using deterministic rules. Returns an auditable classification rule for every input.

Instructions

One contact in, one classified row out. Give it a job title and it returns the department, the seniority level, a seniority_rank from 1 to 12 you can filter with a comparison, and classification_rule, the named rule that fired, so every decision is auditable. The classification is a deterministic rule table: it needs no API key, calls no model, and returns the same answer for the same title every time. Only job_title is required. full_name and company_domain are read only when verify_position is on, which checks whether the person is still listed on their employer's own website and adds roughly 3 seconds and 9 requests per contact. The optional LLM fallback for titles the rules cannot place runs on your own key, set as the LLM_API_KEY secret environment variable on your own copy of the actor, and only the title is ever sent, never the person's name. With no key set those titles come back null rather than failing the row. This actor does not discover people: the name and title come from you. Requires an APIFY_TOKEN and consumes Apify credits. Read only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
full_nameNoOnly needed for position verification. Classification works without it. This name is never sent to any language model.
job_titleYesThe contact's job title, exactly as you hold it. Classified by deterministic rules with no API key needed.
llm_modelNoModel id passed straight through to the provider. Only read when the LLM fallback is on. Default: "gpt-4o-mini".
skipCacheNoSet to true to ignore cached results and classify from scratch. Default: "false".
llm_providerNoWhich provider your LLM_API_KEY belongs to. Only read when the LLM fallback is on. Default: "openai".
company_domainNoOnly needed for position verification. The company's website domain, with or without https.
max_charge_usdNoOptional spending cap for this call, in USD, passed to the actor as max_charge_usd. The run stops before any charge that would take it past this amount and keeps every row already charged. Leave empty to rely only on the maximum charge per run set on your Apify account.
verify_positionNoCheck whether the person is still listed on their employer's own website. Off by default. Adds roughly 3 seconds and 9 requests per contact, and needs both the name and the domain. Default: false.
use_llm_fallbackNoOff by default. When on, titles the rules cannot place are sent to your own model using the LLM_API_KEY secret environment variable you set on your copy of this Actor. Only the title is sent, never the person's name. With no key set the Actor still returns a row, it just leaves those titles null. Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.14.0
    • addedInput schema / properties / max_charge_usd
      Added value: +{
      +  "description": "Optional spending cap for this call, in USD, passed to the actor as max_charge_usd. The run stops before any charge that would take it past this amount and keeps every row already charged. Leave empty to rely only on the maximum charge per run set on your Apify account.",
      +  "minimum": 0,
      +  "type": "number"
      +}
  2. Addedv1.1.1

TDQS

A3.6/5.0
Behavior1/5

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

The description closes with 'Read only,' but the annotations declare readOnlyHint=false. That is a direct textual conflict about the tool's side-effect profile, which is the exact case the rubric scores 1. The otherwise rich behavioral detail (credits, 9 requests/contact, LLM key handling, null fallback) cannot offset a contradiction on the safety-relevant hint.

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 core contract is front-loaded in the first sentence and the remaining detail is organized roughly by concern (determinism, then optional verification, then fallback, then auth/cost). It runs long at ~10 sentences for a 9-param tool and repeats some material already covered by the schema, which keeps it from a 5.

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

Completeness5/5

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

With no output schema, the description compensates by naming every returned field (department, seniority level, seniority_rank, classification_rule). It also covers auth (APIFY_TOKEN, LLM_API_KEY secret), cost model, and the no-key edge case, leaving nothing an agent needs in order to call it correctly.

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 description coverage is 100%, so the schema already documents every parameter, including the conditional nature of full_name/company_domain and the defaults. The description largely restates this (required job_title, name/domain only read under verify_position) rather than adding syntax or semantics the schema lacks. Baseline 3 applies when 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 opening states a specific verb+resource and its exact contract: 'One contact in, one classified row out. Give it a job title and it returns the department, the seniority level, a seniority_rank from 1 to 12... and classification_rule.' It also draws a boundary that no sibling provides ('This actor does not discover people: the name and title come from you'), so an agent can distinguish it from scan_gtm_hiring_signals or resolve_company_identity without opening the schema.

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 gives clear context for use: only job_title is required, and it explains the conditional triggers for optional work (verify_position adds ~3s/9 requests and needs name+domain; use_llm_fallback only fires for titles the rules cannot place). It lacks explicit when-to-use-vs-sibling routing, but the 'does not discover people' statement effectively scopes it against the enrichment siblings.

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