Field Extraction Tool for MCPify

Whitelist and reshape JSON payloads into lean, AI-ready objects. Keep only the fields that matter for your task.

Precise Filtering
Extract only the fields your AI needs, nothing more
Smart Reshaping
Transform nested structures into flat, usable formats
Context Optimization
Minimize token usage while maximizing data relevance

The Field Overload Problem

❌ Without Field Extraction

// Full user object with 50+ fields
{
  "id": "usr_123",
  "email": "[email protected]",
  "name": "Alice Smith",
  "created_at": "2023-01-15T...",
  "updated_at": "2025-08-01T...",
  "last_login": "2025-08-24T...",
  "preferences": {...},
  "analytics": {...},
  "permissions": {...},
  "sessions": [...],
  "audit_log": [...],
  "metadata": {...},
  // 40+ more fields...
}

AI receives 2,000+ tokens of mostly irrelevant data just to get a user's email and name.

✅ With Field Extraction

// Extracted fields only
{
  "id": "usr_123",
  "email": "[email protected]",
  "name": "Alice Smith"
}

AI receives exactly 15 tokens with precisely the information needed for the task.

Powerful Extraction Capabilities

Field Whitelisting

Specify exactly which fields to keep from complex objects. Support for nested field paths and wildcards.

// Configuration
{
  "fields": ["id", "email", "profile.name", "settings.notifications"]
}

// Input: Complex user object
// Output: Clean object with only specified fields

Structure Flattening

Flatten deeply nested structures into simple, flat objects for easier AI processing.

// Nested input
{
  "user": {
    "profile": {
      "personal": {
        "name": "Alice"
      }
    }
  }
}

// Flattened output
{
  "user_profile_personal_name": "Alice"
}

Array Field Extraction

Extract specific fields from arrays of objects, perfect for lists and collections.

// Extract only names and emails from user array
{
  "extract_from": "users",
  "fields": ["name", "email"]
}

// Input: [{id, name, email, ...50 fields}, ...]
// Output: [{name, email}, {name, email}, ...]

Field Renaming & Mapping

Rename fields to match your schema requirements or create cleaner property names.

// Field mapping configuration
{
  "mapping": {
    "customer_identifier": "id",
    "contact_email": "email",
    "full_name": "profile.name"
  }
}

// Output uses your custom field names

Real-World Use Cases

CRM Data Extraction

Extract only contact information from detailed CRM records:

// Extract from 200+ field CRM objects
fields: ["id", "email", "company", "deal_value"]

// Result: 4 fields instead of 200+
// Token reduction: 95%

E-commerce Order Processing

Get essential order details for fulfillment:

// Extract from complex order objects
fields: ["order_id", "items[].sku",
         "shipping.address", "total"]

// Skip payment, analytics, history
// Token reduction: 88%

User Profile Summaries

Create lean user profiles for AI personalization:

// Extract key profile data
fields: ["name", "preferences.language",
         "subscription.tier", "last_active"]

// Ignore sessions, logs, metadata
// Token reduction: 92%

API Response Filtering

Filter third-party API responses before AI processing:

// Extract from verbose API responses
fields: ["data.results[].title",
         "data.results[].url", "pagination"]

// Skip headers, debug, metadata
// Token reduction: 85%

MCPify Integration

Complete Working Example

Step 1: Configure Field Extraction

// MCPify tool configuration
{
  "tool": "field_extract",
  "description": "Extract specified fields from JSON response",
  "input_schema": {
    "type": "object",
    "properties": {
      "ref": {
        "type": "string",
        "description": "Reference to cached response"
      },
      "fields": {
        "type": "array",
        "items": { "type": "string" },
        "description": "Fields to extract (supports nested paths)"
      },
      "rename": {
        "type": "object",
        "description": "Optional field renaming map"
      }
    }
  }
}

Step 2: Use in Your AI Agent

// Fetch full customer data
const response = await mcpify.call("crm.get_customers", {
  limit: 100
});

// Extract only what you need for the task
const extracted = await mcpify.call("field_extract", {
  ref: response.ref,
  fields: [
    "id",
    "name",
    "email",
    "company.name",
    "last_purchase.date",
    "lifetime_value"
  ],
  rename: {
    "company.name": "company",
    "last_purchase.date": "last_purchase",
    "lifetime_value": "ltv"
  }
});

// AI gets clean, focused data
// 6 fields instead of 150+ per customer
// 94% token reduction

Step 3: Process with AI

// AI receives minimal, structured data
await agent.process({
  task: "Identify high-value customers for campaign",
  data: extracted.results,
  // Only 600 tokens instead of 10,000+
});

Why Field Extraction Matters

90%
Average Token Reduction
5x
Faster AI Processing
100%
Data Relevance
$1000s
Monthly Savings

Stop Wasting Tokens on Irrelevant Fields

Field Extraction is built into every MCPify service. Start extracting smarter today.