Skip to main content
Coming Soon - The Dcycle MCP Server is in private beta. Interested in AI integration? Contact us for early access.

Overview

Operations tools help you monitor the health of your data and the status of processing jobs. These are particularly useful for customer support, debugging data issues, and ensuring data quality.

get_processing_jobs

Get processing jobs (file uploads, imports, calculations) for an organization.

Parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID
statusstringNoFilter by status (pending, processing, completed, failed)
entity_namestringNoFilter by entity type (invoice, vehicle, facility)
pageintegerNoPage number (default: 1)
sizeintegerNoItems per page (default: 20)

Example Queries

"Show me recent processing jobs"
"Are there any failed jobs I should look at?"
"What invoice uploads are currently processing?"

Response

{
  "jobs": [
    {
      "id": "job-abc123",
      "entity_name": "invoice",
      "operation": "bulk_upload",
      "status": "completed",
      "records_total": 150,
      "records_processed": 150,
      "records_failed": 0,
      "created_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T10:32:45Z"
    },
    {
      "id": "job-def456",
      "entity_name": "vehicle",
      "operation": "import",
      "status": "failed",
      "records_total": 25,
      "records_processed": 20,
      "records_failed": 5,
      "error_message": "Invalid fuel type in rows 21-25",
      "created_at": "2024-01-15T09:00:00Z",
      "completed_at": "2024-01-15T09:01:30Z"
    }
  ],
  "total": 2,
  "page": 1,
  "size": 20
}

Job Statuses

StatusDescription
pendingJob queued, waiting to start
processingCurrently being processed
completedSuccessfully finished
failedCompleted with errors

get_data_health_status

Get data quality metrics across different entity types.

Parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID
start_datestringYesStart date (YYYY-MM-DD)
end_datestringYesEnd date (YYYY-MM-DD)

Example Query

"What's the data health status for this organization in 2024?"

Response

{
  "organization_id": "ff4adcc7-8172-45fe-9cf1-e90a6de53aa9",
  "period": {
    "start_date": "2024-01-01",
    "end_date": "2024-12-31"
  },
  "overall_health": "good",
  "health_score": 87,
  "by_entity": {
    "invoices": {
      "total_records": 1200,
      "complete_records": 1150,
      "incomplete_records": 50,
      "health_percentage": 95.8,
      "issues": ["50 invoices missing facility assignment"]
    },
    "vehicles": {
      "total_records": 25,
      "complete_records": 22,
      "incomplete_records": 3,
      "health_percentage": 88.0,
      "issues": ["3 vehicles missing fuel consumption data"]
    },
    "employees": {
      "total_records": 200,
      "complete_records": 180,
      "incomplete_records": 20,
      "health_percentage": 90.0,
      "issues": ["20 employees missing commute distance"]
    }
  }
}

Health Score Interpretation

ScoreRatingDescription
90-100ExcellentData is complete and high quality
70-89GoodMinor gaps, suitable for reporting
50-69FairSome data quality issues to address
0-49PoorSignificant data gaps affecting accuracy

get_failed_jobs

Get recent failed processing jobs with error details.

Parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID
limitintegerNoMaximum jobs to return (default: 10)

Example Query

"Show me any failed jobs that need attention"

Response

{
  "failed_jobs": [
    {
      "id": "job-def456",
      "entity_name": "vehicle",
      "operation": "import",
      "created_at": "2024-01-15T09:00:00Z",
      "error_summary": "Validation errors in 5 records",
      "error_details": [
        {
          "row": 21,
          "field": "fuel_type",
          "error": "Invalid value 'diésel'. Expected: diesel, gasoline, electric, etc."
        },
        {
          "row": 22,
          "field": "fuel_type",
          "error": "Invalid value 'diésel'. Expected: diesel, gasoline, electric, etc."
        }
      ],
      "resolution_hint": "Check that fuel types match accepted values. Common issues: accents, typos, language differences."
    }
  ],
  "total_failed_last_7_days": 3
}

Use Cases

  • Debug import issues
  • Identify common data quality problems
  • Support ticket investigation

get_organization_activity

Get a summary of recent activity and overall health assessment.

Parameters

ParameterTypeRequiredDescription
organization_idstringYesOrganization UUID
daysintegerNoDays to look back (default: 7)

Example Query

"What's been happening with this organization's data recently?"

Response

{
  "organization_id": "ff4adcc7-8172-45fe-9cf1-e90a6de53aa9",
  "period_days": 7,
  "activity_summary": {
    "total_jobs": 15,
    "completed_jobs": 12,
    "failed_jobs": 2,
    "pending_jobs": 1,
    "success_rate": 85.7
  },
  "recent_uploads": [
    {
      "entity": "invoices",
      "count": 150,
      "date": "2024-01-15"
    },
    {
      "entity": "vehicles",
      "count": 25,
      "date": "2024-01-14"
    }
  ],
  "health_assessment": {
    "status": "attention_needed",
    "issues": [
      "2 failed vehicle imports need resolution",
      "1 pending job running longer than expected"
    ],
    "recommendations": [
      "Review failed jobs for common data format issues",
      "Check pending job for potential stuck processing"
    ]
  }
}

Common Workflows

Customer Support Triage

User: "A customer says their data isn't showing up. Can you check?"

Claude: Let me check the organization's recent activity.

Activity Summary (Last 7 Days):
• Total jobs: 15
• Completed: 12 (80%)
• Failed: 2 (13%)
• Pending: 1 (7%)

Issues Found:
1. Failed Job (Jan 15): Vehicle import
   Error: Invalid fuel type in 5 rows
   Resolution: Customer needs to use "diesel" instead of "diésel"

2. Pending Job (Jan 16): Invoice processing
   Status: Running for 45 minutes (unusual)
   Action: May need manual investigation

Recommendation:
1. Contact customer about vehicle import fix
2. Escalate pending invoice job to engineering

Data Quality Audit

User: "How's the data quality for 2024 reporting?"

Claude: Here's the data health report:

Overall Health Score: 87/100 (Good)

By Data Type:
• Invoices: 95.8% complete ✓
  Minor: 50 invoices need facility assignment

• Vehicles: 88.0% complete ⚠
  Issue: 3 vehicles missing consumption data

• Employees: 90.0% complete ⚠
  Issue: 20 employees missing commute distance

Impact on Emissions Calculations:
• Scope 2 (invoices): Minimal impact, high confidence
• Scope 1 (vehicles): 3 vehicles excluded from fleet emissions
• Scope 3 (commuting): ~10% of employee emissions estimated

Recommended Actions:
1. Update 50 invoices with facility assignment (quick fix)
2. Add fuel consumption data for 3 vehicles
3. Survey 20 employees for commute information

Monitoring Dashboard

User: "Give me a daily operations summary"

Claude: Operations Summary for Today (Jan 16, 2024):

Processing Activity:
• New jobs: 5
• In progress: 2
• Completed: 3
• Failed: 0

Success rate: 100% ✓

Recent Completions:
• 10:30 - Invoice upload (150 records) ✓
• 11:45 - Employee import (45 records) ✓
• 14:00 - Vehicle update (12 records) ✓

Currently Processing:
• Travel data import (started 14:30)
• Emissions calculation (started 14:35)

No immediate issues to address.

Next Steps