Whitelist and reshape JSON payloads into lean, AI-ready objects. Keep only the fields that matter for your task.
// 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.
// 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.
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 fieldsFlatten 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"
}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}, ...]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 namesExtract 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%
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%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%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%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 reductionStep 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+
});Field Extraction is built into every MCPify service. Start extracting smarter today.