Integration

PromptLayer integration

PromptLayer is a prompt management and LLM observability platform. With it an agent can publish, version, label and fetch prompt templates, build and run workflows (agents), search and analyze logged LLM requests and traces, log requests and scores, manage Tool Registry tools and skill collections, organize the registry in folders, and build Tables with computed and scored columns. Left out: the Dataset, Evaluation and Report endpoints PromptLayer marks deprecated in favour of Tables, the environment variable endpoints (they hold secrets), and the OTLP protobuf trace ingest. Workflow node configurations, table column configurations and built-in tool configurations are not returned, because they can hold endpoint or MCP server credentials. Authentication is a workspace API key, created on the API keys page of the PromptLayer dashboard and sent in the X-API-KEY header; each key acts in its own workspace.

Ask it in chat

Say what should happen.
The workflow builds itself.

When this happens, do that in PromptLayer.Built from the 105 PromptLayer tools below, on the connection you add once.

What you can do with PromptLayer

Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.

Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.

Sheet, 8 operations

  • create_sheetCreate sheetPOSTCreates a sheet in a Table: blank (with a Column A scaffold) when source is omitted, or imported from a CSV file or from request logs. An import runs in the background: poll get_sheet_import_operation.
  • delete_sheetDelete sheetDELETEDeletes a sheet (soft delete): it disappears from list_sheets.
  • get_sheetGet sheetGETReturns one sheet of a Table: title, position, row count and version count.
  • import_csv_into_sheetImport csv into sheetPOSTStarts a background import of a CSV file (sent base64-encoded) into an existing sheet. Returns operation_id: poll get_sheet_import_operation until it finishes.
  • import_request_logs_into_sheetImport request logs into sheetPOSTStarts a background import of request logs (by id or by search filters) into an existing sheet as rows. Returns operation_id: poll get_sheet_import_operation until it finishes.
  • list_sheetsList sheetsGETLists the sheets of a Table in display order, optionally only those with a column referencing a given prompt, prompt version or label. Cursor pagination with cursor and limit.
  • recalculate_sheetRecalculate sheetPOSTQueues recalculation of a sheet's computed cells (stale ones by default), optionally limited to columns, rows or statuses. Runs model calls that can spend provider credits. Large runs first return a confirmation_token.
  • update_sheetUpdate sheetPATCHRenames a sheet (title) or moves it to another position in the Table (index). Leave a field out to keep it. Returns the sheet and its new version count.

Prompt template, 6 operations

  • get_prompt_templateGet prompt templatePOSTReturns a prompt template version (latest, or by version or label), optionally filled with input_variables, plus llm_kwargs ready for the provider client. Read-only despite the method.
  • get_prompt_template_rawGet prompt template rawGETReturns a prompt template version as stored (latest, or by version or label) without filling input variables. resolve_snippets=false keeps @@@snippet@@@ references.
  • list_prompt_templatesList prompt templatesGETLists the prompt templates of the workspace, newest first, each with its latest version (or the one a label points to). page/per_page pagination; filters by name, label, tags, status and more.
  • patch_prompt_templatePatch prompt templatePATCHCreates a new prompt template version from a base version (latest by default) with only the fields you send changed: messages, tools, model parameters, labels and more.
  • publish_prompt_templatePublish prompt templatePOSTPublishes a prompt template: creates the template, or a new version of an existing one with the same prompt_name, optionally moving release labels to it. Snippets it references must exist first.
  • upsert_prompt_template_by_external_idUpsert prompt template by external idPUTPublishes a prompt template by your own external ID: a new version of the mapped template when the mapping exists, otherwise creates or updates the template from the body and attaches the mapping.

Request log, 6 operations

  • get_request_logGet request logGETReturns one logged request: its prompt blueprint (input and output), provider, model, token usage, price, timing and trace_id when tracing data exists.
  • log_requestLog requestPOSTRecords an LLM request made outside PromptLayer (custom provider, direct client call) as a request log, with input and output in Prompt Blueprint format. Returns the new request log id.
  • search_request_logsSearch request logsPOSTSearches logged LLM requests with structured filters (filter_group), free text (q), sorting and page/per_page pagination (at most 25 per page). Rate limited to 10 calls per minute. Read-only.
  • track_request_metadataTrack request metadataPOSTAttaches searchable metadata (session id, user id, environment and other key-value pairs) to an existing request log.
  • track_request_promptTrack request promptPOSTLinks an existing request log to a prompt template, by name plus an optional version or release label, with the input variables used.
  • track_request_scoreTrack request scorePOSTGives an existing request log a score from 0 to 100, under a score name (default when omitted).

Sheet scorecard, 5 operations

  • configure_sheet_scorecardConfigure sheet scorecardPATCHCreates or updates the active scorecard of a sheet: name, aggregation (required), criteria steps and evaluated columns. Then run recalculate_sheet_scorecard to compute it.
  • delete_sheet_scorecardDelete sheet scorecardDELETEDeletes (soft delete) the active scorecard of a sheet.
  • get_sheet_scorecardGet sheet scorecardGETReturns the active scorecard of a sheet (criteria steps, aggregation, thresholds) with its latest and displayed calculation and per-criterion summaries.
  • migrate_legacy_score_to_scorecardMigrate legacy score to scorecardPOSTConverts a sheet's legacy score configuration into scorecard criteria. With delete_legacy_score=true the legacy score configuration is deleted after conversion.
  • recalculate_sheet_scorecardRecalculate sheet scorecardPOSTQueues a scorecard calculation for a sheet, optionally only for some rows or criteria steps. LLM-based criteria run model calls. Returns calculation_id for get_scorecard_calculation.

Table, 5 operations

  • create_tableCreate tablePOSTCreates a Table. By default it also creates Sheet 1 with a Column A text column and one empty row (create_default_sheet=false creates none). Returns the table and its default sheet.
  • delete_tableDelete tableDELETEDeletes a Table (soft delete): it disappears from list_tables and its sheets stop being available.
  • get_tableGet tableGETReturns one Table with its sheet count and the row count of each sheet (sheet_row_counts, keyed by sheet id).
  • list_tablesList tablesGETLists Tables in the workspace, filterable by name, folder or prompt column. Cursor pagination: pass the returned next_cursor as cursor with the same filters and order.
  • update_tableUpdate tablePATCHRenames a Table (title) or moves it into a registry folder (folder_id). Leave a field out to keep it.

Workflow, 5 operations

  • create_workflowCreate workflowPOSTCreates a workflow (pass name) or a new version of one (pass workflow_id or workflow_name) from the full graph: nodes, edges, input variables, release labels.
  • get_workflowGet workflowGETReturns a workflow version (latest, or by version or label) with its nodes (name, type, dependencies), edges and required input variables. Node configurations are not returned.
  • list_workflowsList workflowsGETLists the workflows (agents) of the workspace. page/per_page pagination with creator, date and external ID filters.
  • run_workflowRun workflowPOSTStarts a run of a workflow by name (latest version, or by label or version number) and returns workflow_version_execution_id; read results with get_workflow_execution_results. Runs billed model calls.
  • update_workflowUpdate workflowPATCHCreates a new workflow version from a base version (latest by default): nodes merged by name (null removes one), configuration deep-merged, edges and input variables replaced when sent.

Cell, 4 operations

  • get_cellGet cellGETReturns one cell: status, value, display value, error and, for prompt-template columns, request metrics (price, latency, tokens).
  • recalculate_cellRecalculate cellPOSTQueues recalculation of one computed cell; a prompt or LLM column runs a model call that can spend provider credits. An HTTP 200 answer with success=false means nothing was queued.
  • recalculate_cellsRecalculate cellsPOSTQueues recalculation of the listed computed cells; prompt or LLM columns run model calls that can spend provider credits. An HTTP 200 answer with success=false means nothing was queued.
  • update_cellUpdate cellPATCHOverwrites the value of a text-column cell (computed cells cannot be edited). Dependent computed cells become stale; returns how many.

Column, 4 operations

  • create_columnCreate columnPOSTAdds a column to a sheet: a TEXT input column or a computed column (prompt template, code, LLM assertion and more). A computed column creates stale cells for every existing row.
  • delete_columnDelete columnDELETEDeletes a column and all its cells. Downstream dependent cells may become stale. Creates a new sheet version.
  • list_columnsList columnsGETLists the columns of a sheet in position order. System metadata columns (price, latency) are left out unless include_system_columns=true. Cursor pagination.
  • update_columnUpdate columnPATCHChanges a column's title, config or dependencies. Leave a field out to keep it. requires_recalculation=true means existing values were invalidated; run recalculate_sheet to refresh them.

Skill collection, 4 operations

  • create_skill_collectionCreate skill collectionPOSTCreates a skill collection from files sent inline (each {path, content}) and saves its first version. Returns the new collection.
  • get_skill_collectionGet skill collectionGETReturns a skill collection by UUID, name or root path, with the files of its latest version, or of the version pinned by version or label.
  • list_skill_collectionsList skill collectionsGETLists the non-deleted skill collections of the workspace, with optional creator, date and external ID filters and sorting.
  • rename_skill_collectionRename skill collectionPATCHRenames a skill collection. Updates metadata only; to change its files use save_skill_collection_version.

Tool, 4 operations

  • create_toolCreate toolPOSTCreates a tool in the Tool Registry with version 1 from an OpenAI function-calling definition. An optional execution body (python or javascript) is auto-run in a sandbox when a prompt calls the tool.
  • get_toolGet toolGETReturns a Tool Registry tool by numeric id or name, resolved to its latest version or to the one given by label or version, including its tool definition and execution body.
  • list_toolsList toolsGETLists the tools in the workspace Tool Registry (name, id, description, folder), most recently updated first, with optional filters.
  • test_execute_toolTest execute toolPOSTRuns a tool's execution body in the PromptLayer sandbox with test inputs and returns its result, stdout and stderr. A code error still answers success=true: read result.status.

Folder, 3 operations

  • create_folderCreate folderPOSTCreates a folder in the prompt registry, at the workspace root or inside parent_id. The name must be unique within its parent folder. Returns the new folder with its id.
  • rename_folderRename folderPATCHRenames a registry folder. The new name must be unique within the folder's parent (or at the root).
  • resolve_folder_idResolve folder idGETReturns the id of a registry folder from its dot-separated path, such as "My Folder.Subfolder".

Folder external id, 3 operations

  • attach_folder_external_idAttach folder external idPOSTAttaches a {source, external_id} mapping to a folder. Idempotent on the same folder; reusing the mapping on another entity is refused with a conflict.
  • delete_folder_external_idDelete folder external idDELETEDetaches an external ID mapping from a folder. The folder itself is kept.
  • list_folder_external_idsList folder external idsGETLists the external ID mappings ({source, external_id}) attached to a folder.

Prompt label, 3 operations

  • create_prompt_labelCreate prompt labelPOSTCreates a release label (such as prod) on a version of a prompt template. Applications that fetch the template by that label then get this version.
  • delete_prompt_labelDelete prompt labelDELETEDeletes a release label from a prompt template version. Applications fetching the template by that label stop resolving it.
  • move_prompt_labelMove prompt labelPATCHMoves a release label to another version of the same prompt template. Applications that fetch by that label get the new version at once.

Prompt template external id, 3 operations

  • attach_prompt_template_external_idAttach prompt template external idPOSTAttaches a {source, external_id} mapping to a prompt template. Idempotent on the same template; reusing the mapping on another entity is refused with a conflict.
  • delete_prompt_template_external_idDelete prompt template external idDELETEDetaches an external ID mapping from a prompt template. The template itself is kept.
  • list_prompt_template_external_idsList prompt template external idsGETLists the external ID mappings ({source, external_id}) attached to a prompt template.

Registry entity, 3 operations

  • delete_registry_entitiesDelete registry entitiesDELETEDeletes registry entities (folders, prompts, snippets, workflows and more). Irreversible from this API. cascade=true also deletes everything inside the listed folders; without it a non-empty folder is refused.
  • list_registry_entitiesList registry entitiesGETLists the entities in a registry folder (or at the workspace root): folders, prompts, snippets, workflows and more. Supports name or semantic search, type, tag, date and external ID filters.
  • move_registry_entitiesMove registry entitiesPOSTMoves registry entities into folder_id, or to the workspace root when folder_id is omitted. Needs edit permission on each entity. Returns the number moved.

Sheet operation, 3 operations

  • cancel_sheet_operationCancel sheet operationDELETECancels an active recalculation operation of a sheet. Cells not started are reset; running cells are invalidated.
  • get_sheet_operationGet sheet operationGETReturns the status of a recalculation operation started by recalculate_sheet: cell counts by status, completed, failed and pending.
  • list_sheet_operationsList sheet operationsGETLists the active recalculation operations of a sheet with cell status counts (total, pending and per status).

Sheet score, 3 operations

  • configure_sheet_scoreConfigure sheet scorePATCHSets the (legacy) scoring configuration of a sheet. Does not compute the score: requires_recalculation tells whether recalculate_sheet_score is needed. Leave a field out to keep it.
  • get_sheet_scoreGet sheet scoreGETReturns the current (legacy) score of a sheet: aggregate and per-column scores, scored and excluded rows, score matrix and the score configuration.
  • recalculate_sheet_scoreRecalculate sheet scorePOSTQueues recalculation of a sheet's existing (legacy) score configuration.

Sheet version, 3 operations

  • create_sheet_versionCreate sheet versionPOSTSaves a named version of a sheet, or restores an existing version (source_version_id) by creating a new version from it, which replaces the sheet's current content.
  • get_sheet_versionGet sheet versionGETReturns one saved version of a sheet: number, name, creation time, score and score configuration.
  • list_sheet_versionsList sheet versionsGETLists the saved versions of a sheet (number, name, creation time, score). Cursor pagination: reuse next_cursor only with the same sort and order.

Skill collection external id, 3 operations

  • attach_skill_collection_external_idAttach skill collection external idPOSTAttaches a {source, external_id} mapping to a skill collection. Idempotent on the same collection; reusing the mapping on another entity is refused with a conflict.
  • delete_skill_collection_external_idDelete skill collection external idDELETEDetaches an external ID mapping from a skill collection. The collection itself is kept.
  • list_skill_collection_external_idsList skill collection external idsGETLists the external ID mappings ({source, external_id}) attached to a skill collection.

Tool external id, 3 operations

  • attach_tool_external_idAttach tool external idPOSTAttaches a {source, external_id} mapping to a Tool Registry tool. Idempotent on the same tool; reusing the mapping on another entity is refused with a conflict.
  • delete_tool_external_idDelete tool external idDELETEDetaches an external ID mapping from a Tool Registry tool. The tool itself is kept.
  • list_tool_external_idsList tool external idsGETLists the external ID mappings ({source, external_id}) attached to a Tool Registry tool.

Workflow external id, 3 operations

  • attach_workflow_external_idAttach workflow external idPOSTAttaches a {source, external_id} mapping to a workflow. Idempotent on the same workflow; reusing the mapping on another entity is refused with a conflict.
  • delete_workflow_external_idDelete workflow external idDELETEDetaches an external ID mapping from a workflow. The workflow itself is kept.
  • list_workflow_external_idsList workflow external idsGETLists the external ID mappings ({source, external_id}) attached to a workflow.

Request analytics, 2 operations

  • get_request_analyticsGet request analyticsPOSTReturns aggregated analytics over the request logs matching the filters: totals, cost, tokens, latency percentiles, time-series buckets and model, prompt, provider, tag and metadata breakdowns. Read-only.
  • query_request_analyticsQuery request analyticsPOSTRuns custom aggregations (count, sum, avg, min, max, percentile) over request logs, optionally grouped by a field or metadata key or bucketed over time. Returns chart data rows per query. Read-only.

Row, 2 operations

  • add_rowsAdd rowsPOSTAppends 1 to 100 rows to a sheet, optionally with initial text-column values. Computed cells of the new rows are created stale and are computed only by a recalculation.
  • list_rowsList rowsGETLists the rows of a sheet, each with a map of column_id to cell (status, value, error). Optionally includes column metadata, row count and execution metric aggregates. Cursor pagination.

Scorecard calculation, 2 operations

  • cancel_scorecard_calculationCancel scorecard calculationPOSTCancels queued or running scorecard work for a sheet, optionally only for some rows or criteria steps.
  • get_scorecard_calculationGet scorecard calculationGETReturns one scorecard calculation: status, progress, aggregate score and verdict, per-criterion summaries and drift against the baseline.

Scorecard row, 2 operations

  • get_scorecard_rowGet scorecard rowGETReturns the scorecard breakdown of one row: aggregate score and verdict and each criterion step's result.
  • list_scorecard_rowsList scorecard rowsGETLists row-level scorecard results (score, verdict, drift) for a calculation, the latest by default, filterable by verdict. Paged by row index: pass next_cursor as cursor.

Trace, 2 operations

  • close_traceClose tracePOSTCloses a trace for good: later spans sent for it are rejected. There is no reopen. Refused with a conflict if already closed, not found if the trace has no spans.
  • get_traceGet traceGETReturns every span of a trace with its metadata and, for spans that produced a request log, its request_log_id.

Prompt template label, 1 operation

  • list_prompt_template_labelsList prompt template labelsGETLists the release labels of a prompt template, each with its id and the version it points to.

Request search suggestion, 1 operation

  • list_request_search_suggestionsList request search suggestionsGETReturns autocomplete values for a request-log field (engines, tags, metadata keys or values, tool names and more), optionally scoped by a filter group. Rate limited to 10 calls per minute.

Sheet import operation, 1 operation

  • get_sheet_import_operationGet sheet import operationGETReturns the status and progress of a background sheet import (CSV file or request logs) started by create_sheet, import_csv_into_sheet or import_request_logs_into_sheet.

Sheet score history, 1 operation

  • get_sheet_score_historyGet sheet score historyGETReturns the score of a sheet across its versions as history points, for a range of recent versions.

Skill collection version, 1 operation

  • save_skill_collection_versionSave skill collection versionPOSTSaves a new version of a skill collection from file updates ({path, content}), moves ({old_path, new_path}) and deletes (paths), optionally with a commit message and release label.

Snippet, 1 operation

  • get_snippet_usageGet snippet usageGETLists the prompts (and their version numbers) and the release labels that reference a snippet, identified by name or id.

Span, 1 operation

  • create_spansCreate spansPOSTWrites a batch of observability spans, optionally with a request log per span. Atomic: if one span fails the whole batch is rolled back. close_after=true closes those traces for good.

Tool version, 1 operation

  • create_tool_versionCreate tool versionPOSTCreates a new immutable version of a Tool Registry tool (next version number) with a new definition and optional execution body.

Trace analytics, 1 operation

  • query_trace_analyticsQuery trace analyticsPOSTRuns custom aggregations over traces, at trace level (trace_* fields) or span level (span_* fields, not both in one chart). Returns chart data rows per query. Read-only.

Workflow execution result, 1 operation

  • get_workflow_execution_resultsGet workflow execution resultsGETReturns the results of a workflow run, keyed by node name (status, value, error). If any node is still QUEUED or RUNNING the run is not finished: call again later.

Workflow label, 1 operation

  • list_workflow_labelsList workflow labelsGETLists the release labels of a workflow, each with its id and the version it points to.

Use PromptLayer from Claude Code, Cursor or Codex

Connect PromptLayer in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its PromptLayer operations become tools the client can call, next to every other integration you connected.

Claude Code
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"
Codex (~/.codex/config.toml)
[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"

[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"
Cursor, Claude Desktop and other JSON configs
{
  "mcpServers": {
    "livecontext": {
      "type": "http",
      "url": "https://livecontext.ai/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Set up the MCP server step by step

How to connect PromptLayer

  1. Create your workspace

    Sign up free. Nothing to install.

  2. Connect PromptLayer once

    Add your PromptLayer connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.

  3. Describe the job in chat

    The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.

PromptLayer integration FAQ

What can you do with the PromptLayer integration?

LiveContext exposes 105 operations on PromptLayer, covering sheet, prompt template, request log and sheet scorecard.

Popular integrations

Browse the whole catalog