Optimize LinkedIn Budget
User asks how to allocate their LinkedIn budget, wants budget optimization recommendations, or asks “How should I split my LinkedIn spend?”
Uses linear programming to optimize budget allocation across campaigns:
Optimization Process:
- Analyzes historical campaign performance
- Calculates efficiency scores (conversions or leads per dollar)
- Uses scipy linear programming to find optimal allocation
- Respects constraints (max change %, min budget, total budget)
Returns:
- Current vs Optimized budget allocation
- Expected impact (conversion/lead lift)
- Campaigns to SCALE, MAINTAIN, REDUCE, or PAUSE
- Projected improvement percentage
Constraints Applied:
- Total budget = user specified amount
- Max change per campaign (default 50%)
- Min daily budget (LinkedIn minimum 20)
- Only allocate to profitable campaigns (ROAS > 1.0)
Parameters:
- total_budget: Total monthly budget to allocate (required, > 0)
- lookback_days: Historical data period (7-120). Default: 30
- start_date: Optional start date (YYYY-MM-DD). Overrides lookback_days when used with end_date.
- end_date: Optional end date (YYYY-MM-DD). Overrides lookback_days when used with start_date. ⚠️ DATE CLARIFICATION: If the user’s date request is vague or ambiguous (e.g., “March to June” without a year, “last quarter”, “recently”, “a few months ago”), ask the user to specify exact dates before calling this tool. Do not assume or guess dates.
- target_roas: Target ROAS for optimization
- max_change_percentage: Max budget change (0.3-0.7). Default: 0.5
- min_daily_budget: Minimum daily budget. Default: $20
- optimization_goal: ‘conversions’ or ‘leads’. Default: conversions
- ad_account_id: Required for multi-account users. Get from list_connected_accounts
Example Prompts:
- “How should I allocate $30K across LinkedIn campaigns?”
- “Optimize my LinkedIn budget for leads”
- “Which LinkedIn campaigns should get more budget?”
- “How can I improve LinkedIn campaign efficiency?”
Execution time: 4-6 seconds
Authorizations
API key from https://adspirer.ai/keys. Prefix sk_live_. Treat as a secret — never commit.
Headers
Client-generated UUID to make writes idempotent. Strongly recommended for write tools. A repeat call with the same key returns the cached result instead of re-executing. Example: 550e8400-e29b-41d4-a716-446655440000
Body
All tool arguments are wrapped in an arguments object. The fields accepted inside arguments are listed below — required fields are marked with a red asterisk.
Input schema for LinkedIn budget optimization
Response
Tool executed successfully. data.text carries the human-readable result (markdown-friendly). data.quota shows your current usage against the plan limit. data.structured appears when the tool emits machine-parseable structured content. data.content appears for tools that return non-text blocks (images, resources).
Returned on HTTP 200. data.text is the primary human-readable output. data.quota is always present for billable calls. data.structured is set only when the tool emits machine-parseable structured content. data.content is set only when the tool emits non-text content blocks.

