IMPLEMENTATION
Call this tool
Connect a user's Drata account once, then configure and run Find Controls from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "drata-find-controls",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
drata: { authProvisionId: "apn_xxxxxxx" },
q: "Query",
frameworkTags: ["Framework Tags"],
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "drata-find-controls",
"configured_props": {
"drata": { "authProvisionId": "apn_xxxxxxx" },
"q": "Query",
"frameworkTags": ["Framework Tags"]
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "drata",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "drata-find-controls",
arguments: {
q: "Query",
frameworkTags: ["Framework Tags"],
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
q Query | string | Query to search for Optional |
frameworkTags Framework Tags | string[] | Filter data by controls associated with these framework tags Optional |
frameworkSlug Framework Slug | string | Filter data by controls associated with these custom framework Slug Optional |
trustServiceCriteria Trust Service Criterion | string[] | Filter controls on their Trust Service Criteria Optional |
ismsCategory ISMS Category | string[] | Filter controls on their ISMS Category Optional |
isms2022Category ISMS Category | string[] | Filter controls on their ISMS Category Optional |
isAnnexA2022 Is Annex A 2022 | boolean | Filter controls on if they are an Annex A requirement Optional |
rules Rules | string[] | Filter controls on their Hipaa rules Optional |
subRules Sub Rules | string[] | Filter controls on their Hipaa sub rules Optional |
pciRequirements PCI Requirements | string[] | Filter controls on their PCI requirements Optional |
chapters Chapters | string[] | Filter controls on their GDPR chapters Optional |
statutes Statutes | string[] | Filter controls on their CCPA statutes Optional |
regulations Regulations | string[] | Filter controls on their CCPA regulations Optional |
functions Functions | string[] | Filter controls on their NIST CSF Functions Optional |
sections Sections | string[] | Filter controls on their MSSSPA Section Optional |
controlFamilies Control Families | string[] | Filter controls on their NIST SP 800-171 Control Family Optional |
controlClasses Control Classes | string[] | Filter controls on their NIST SP 800-171 Control Class Optional |
iso27701 ISO 27701 | string[] | Filter controls on their ISO27701 requirements Optional |
cobit COBIT | string[] | Filter controls on their COBIT requirements Optional |
soxitgc SOX ITGC | string[] | Filter controls on their SOX requirements Optional |
controlBaselines Control Baselines | string[] | Filter controls on their NIST SP 800-53 Control Baseline Optional |
cmmcClasses CMMC Classes | string[] | Filter controls on their NIST SP 800-53 Control Baseline Optional |
domains Domains | string[] | Filter controls on their FFIEC Domains Optional |
assessmentFactors Assessment Factors | string[] | Filter controls on their FFIEC Assessment Factors Optional |
userIds User Ids | integer[] | User Ids of Control Owners Optional |
isOwned Is Owned | boolean | Filter controls on if they have a control owner Optional |
isReady Is Ready | boolean | Filter controls on if they are ready Optional |
isAnnexA Is Annex A | boolean | Filter controls on if they are an Annex A requirement Optional |
isArchived Is Archived | boolean | Filter to controls that are or are not archived Optional |
isMonitored Is Monitored | boolean | Filter to controls that are or are not monitored Optional |
hasEvidence Has Evidence | boolean | Filter to controls with or without evidence Optional |
hasPassingTest Has Passing Test | boolean | Filter to controls with at least one passing test Optional |
excludeIds Exclude IDs | integer[] | Exclude controls by array of id Optional |
excludeRequirementId Exclude Requirement ID | integer | Exclude controls if they are mapped to this requirement id Optional |
requirementId Requirement ID | integer | Only include controls if they are mapped to this requirement id Optional |
excludeTestId Exclude Test ID | integer | Exclude controls if they are mapped to this test id Optional |
testId Test ID | integer | Only include controls if they are mapped to this test id Optional |
hasTicket Has Ticket | string | Only include controls if they associted to a task management ticket Optional |
connectionId Connection ID | integer | This will be filled in automatic when using a taskManagementStatus. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- drata-find-controls
- Version
- 0.0.4
- App
- Drata
- Authentication
- API key
- Read-only
- Yes
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗