PromptLayer
PromptLayer is a prompt management and observability platform for versioning, evaluating, running, and analyzing LLM applications.
Verdict
Common use cases
- Audit which prompt version shipped last week
- Fetch a workflow definition to debug a failure
- Compare two prompt template versions side by side
- Pull request logs to diagnose a latency spike
- Query a PromptLayer Table for analysis
Integration
- Vendor
- PromptLayer
- Category
- other
- Auth
- API_KEY
- Tools
- 16
- Composio slug
promptlayer
Tools
- Get Prompt Template
Retrieve a prompt template version, release label, messages, model metadata, snippets, and optionally provider-ready kwargs without executing it.
- Get Registered Tool
Retrieve a PromptLayer registered tool definition by ID or name at a selected version or release label without test execution.
- Get Request Log
Retrieve one PromptLayer request log with its recorded input, output, timing, usage, metadata, tags, and scores.
- Get Skill Collection
Retrieve a PromptLayer skill collection and its files as JSON at a selected version or release label.
- Get Table
Retrieve one PromptLayer Table's metadata and per-sheet row counts by UUID.
- Get Workflow
Retrieve a PromptLayer workflow definition by ID or name at a specific version or release label without running it.
- List Folder Entities
Browse or search PromptLayer folders and registry entities in the API-key workspace, optionally recursively and with metadata.
- List Prompt Templates
Search and page through PromptLayer prompt templates and snippets without executing a model.
- List Registered Tools
List and filter tools defined in PromptLayer's tool registry without executing them.
- List Skill Collections
List and filter PromptLayer skill collections available in the API-key workspace.
- List Table Columns
List one page of user and optionally system columns for a PromptLayer Table sheet.
- List Table Rows
Read one page of rows and cells from a PromptLayer Table sheet, with optional schema and execution aggregates.
- List Tables
Search and page through PromptLayer Tables by folder, name, or referenced prompt.
- List Table Sheets
List one page of sheets in a PromptLayer Table, optionally filtering by referenced prompt.
- List Workflows
Search and page through PromptLayer workflows without running them.
- Search Request Logs
Search PromptLayer request logs by text or structured filters and return one rate-limited page sorted by operational fields.
Setup
Setup guide
- 11. In Switchy, open your workspace settings and navigate to the Integrations tab. 2. Click 'Add MCP Integration' and select PromptLayer from the catalog. 3. In a new browser tab, log in to PromptLayer and go to Settings → API Keys. 4. Generate a new API key with read permissions for prompt templates, request logs, tools, workflows, and tables. 5. Copy the key and paste it into the Switchy connection dialog, then click 'Connect'. 6. Switchy will verify the key and confirm the connection. 7. To test, create or open a Project, type '@PromptLayer list my prompt templates' and send the message. 8. If the integration replies with a list of templates from your workspace, the connection is live. 9. You can now @mention PromptLayer in any Project to query your registry or logs.
What teammates see: by default, memories from PromptLayer are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Projects have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
List Recent Templates
@PromptLayer list my five most recently updated prompt templates and show their names and last modified dates.
Retrieve Prompt by Name
@PromptLayer get the prompt template named 'customer-support-greeting' at the production release label and show me its messages and model settings.
Inspect Request Log
@PromptLayer get request log ID pl_request_abc123 and summarize the input prompt, model response, latency, and token count.
Browse Workflow Definitions
@PromptLayer list all workflows in my workspace and show their names, versions, and descriptions.
Query Table Metadata
@PromptLayer get the table with UUID tbl_xyz789 and tell me how many rows are in each sheet and when it was last updated.
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@PromptLayer list all prompt templates in the 'customer-support' folder and show me which ones are currently in production
Found 7 prompt templates in the customer-support folder. Three are tagged with production release labels: 'ticket-triage-v2' (release: prod-2024-01, last updated 3 days ago), 'escalation-response' (release: prod-stable, last updated 2 weeks ago), and 'satisfaction-survey' (release: prod-2024-01, last updated yesterday). The remaining four templates are in development or staging. Each template includes version history showing when it was promoted to production and by whom.
This example demonstrates registry browsing and release-label filtering. Useful for auditing which prompts are live in your application. Requires read access to the PromptLayer workspace; folder structure and release-label conventions vary by team, so results depend on your organization's naming practices.
@PromptLayer retrieve the latest production version of the 'onboarding-email' prompt template and show me the full message structure with variables
Retrieved 'onboarding-email' template at release label 'prod-stable' (version 12, committed 2024-01-15). The template contains 2 messages: a system message defining tone and constraints, and a user message with 4 variables: {{user_name}}, {{company_name}}, {{trial_days}}, and {{support_email}}. Model metadata specifies gpt-4o-mini with temperature 0.7 and max_tokens 500. The template also includes 3 snippets for common personalization patterns that can be composed into the main prompt.
This example shows how to inspect a prompt's structure before using it in code. The Get Prompt Template tool returns the full definition without executing a model call, making it safe for exploration. You'll need the exact template name or ID; version and release-label resolution follows PromptLayer's registry rules.
@PromptLayer pull the last 20 request logs for the 'summarization-workflow' and calculate the average token usage and p95 latency
Retrieved 20 request logs for 'summarization-workflow' from the past 48 hours. Average input tokens: 1,247; average output tokens: 318; average total cost: $0.0089 per request. P95 latency: 3.2 seconds (measured from request start to final token). Two requests failed with rate-limit errors; one was retried successfully. Tags show 14 requests came from the web app, 6 from the batch processor. All logs include full input/output pairs and metadata, enabling replay or fine-tuning dataset export.
This example combines log retrieval with AI-driven analysis to surface performance patterns PromptLayer tracks but doesn't auto-aggregate. Requires API key with log-read permissions. Request logs are retained per your PromptLayer plan; older logs may be archived. Useful for cost monitoring and debugging production prompt behavior.
Use-case deep-dives
When PromptLayer replaces scattered Google Docs and Slack threads
A 6-person product team ships AI features every sprint and keeps rewriting the same prompts in three different repos. PromptLayer wins here because Get Prompt Template and List Prompt Templates let the team version, label, and retrieve prompts from a single registry instead of hunting through commit history. The API-key auth means every engineer can pull the latest release label without OAuth friction. The threshold: if your team only has 2-3 prompts that rarely change, a shared markdown file in the repo is simpler. But once you hit 10+ prompts with A/B tests or customer-specific variants, the registry pays off. Pull PromptLayer into your Switchy workspace so the PM can draft new templates and engineers can fetch them without leaving the chat.
When Get Request Log saves hours of customer-issue triage
A 3-person support team at a SaaS startup fields tickets about weird AI responses, and engineers waste half a day reproducing each one. PromptLayer's Get Request Log tool retrieves the exact input, output, timing, and metadata for any logged request, so support can link the ticket to the log UUID and engineers see the full context in 30 seconds. The 16 tools include Get Workflow and Get Registered Tool, which matter if your AI stack chains multiple steps—support can trace which workflow node failed. The catch: this only works if your backend already logs requests to PromptLayer. If you're not instrumenting your app yet, set that up first. Once you are, add PromptLayer to Switchy so support can pull logs without pinging engineering.
When Get Table and List Folder Entities turn audit prep into a query
A 4-person ops team at a fintech needs to prove which prompt versions were live during Q3 for a compliance audit, and the alternative is manually screenshotting Jira tickets. PromptLayer's Get Table and List Folder Entities let them export versioned prompt metadata, workflow definitions, and release labels as structured JSON, then hand it to auditors. The API-key auth means the compliance lead can run queries without waiting for IT to provision OAuth. The limit: if your audit scope includes model outputs or PII, you'll still need separate data-retention tooling—PromptLayer logs metadata, not raw customer data. But for proving which prompts were deployed when, it's faster than spreadsheets. Connect it to Switchy so the ops lead can query the registry during audit prep without switching tools.
Frequently asked
What does the PromptLayer MCP do in Switchy?
It connects your team's PromptLayer workspace so AI agents can read prompt templates, retrieve request logs, browse workflows, and pull tool definitions without leaving the conversation. Your agents see the same prompts and metadata your engineers version in PromptLayer, making it easy to reference production configs during debugging or iteration.
Do I need admin access to connect PromptLayer?
You need an API key with read permissions for the workspace you want to query. PromptLayer issues keys at the workspace level, so anyone with key-generation rights can connect the MCP. The integration never writes data back—it only reads templates, logs, and registry metadata—so a read-scoped key is sufficient.
Can the MCP execute prompts or run workflows?
No. It retrieves definitions and metadata only. You can fetch a prompt template's messages and model config, or pull a workflow's structure, but the MCP won't send requests to OpenAI or run the workflow. If you need execution, call PromptLayer's API directly or use a separate automation tool.
Why use this instead of opening PromptLayer in a browser?
Your AI agents can pull the exact prompt version a user is asking about, compare two template releases side by side, or grep through request logs—all inline in the chat. No tab-switching, no copy-paste. It's faster for debugging production issues and keeps the full context in one thread.
Who on the team should connect this MCP?
Whoever manages your PromptLayer workspace or holds the API keys. Once connected in Switchy, every team member can ask agents to query templates and logs. The MCP respects the workspace scope of the key, so you won't leak data across projects if you use separate keys per environment.