Skip to content

Commit c80513b

Browse files
committed
add count to regex tools
1 parent b334d1d commit c80513b

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

docs/ai-interfaces/port-ai/api-interaction.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ curl 'https://api.port.io/v1/ai/invoke' \
5454
-H 'Content-Type: application/json' \
5555
--data-raw '{
5656
"prompt":"What services are failing health checks?",
57-
"tools": ["^(list|get|search)_.*"],
57+
"tools": ["^(list|get|search|count)_.*"],
5858
"labels": {
5959
"source": "monitoring_system",
6060
"environment": "production",
@@ -322,14 +322,15 @@ Include a `tools` parameter in your API request with an array of regex patterns.
322322
Perfect for monitoring dashboards and reporting systems where no modifications should be made.
323323
324324
```json
325-
["^(list|get|search|track|describe)_.*"]
325+
["^(list|get|search|count|track|describe)_.*"]
326326
```
327327
328328
**What this matches:**
329329
- `get_entities`, `get_blueprint`, `get_scorecard`.
330330
- `list_entities`, `search_entities`.
331+
- `count_entities`.
331332
- `describe_user_details`.
332-
- `search_port_docs_sources`, `ask_port_docs`.
333+
- `search_port_sources`.
333334
334335
</details>
335336
@@ -371,11 +372,12 @@ Target specific third-party service integrations.
371372
Enables entity operations while preventing accidental deletions.
372373
373374
```json
374-
["(?!delete_)\\w+_entity$", "get_.*", "list_.*"]
375+
["(?!delete_)\\w+_entity$", "get_.*", "list_.*", "count_.*"]
375376
```
376377
377378
**What this matches:**
378379
- `get_entity`, `list_entities`, `create_entity`, `update_entity`.
380+
- `count_entities`.
379381
- **Excludes:** `delete_entity`.
380382
381383
</details>
@@ -390,7 +392,7 @@ Focus on documentation search and help functionality.
390392
```
391393
392394
**What this matches:**
393-
- `search_port_docs_sources`, `ask_port_docs`.
395+
- `search_port_sources`.
394396
- `describe_user_details`.
395397
396398
</details>
@@ -401,13 +403,13 @@ Focus on documentation search and help functionality.
401403
Focus on catalog structure and quality metrics without action execution.
402404
403405
```json
404-
[".*blueprint.*", ".*scorecard.*", "^(get|list)_.*"]
406+
[".*blueprint.*", ".*scorecard.*", "^(get|list|count)_.*"]
405407
```
406408
407409
**What this matches:**
408410
- `get_blueprints`, `get_blueprint`.
409411
- `get_scorecards`, `get_scorecard`.
410-
- All get/list operations.
412+
- All get/list/count operations.
411413
412414
</details>
413415
@@ -448,7 +450,7 @@ curl 'https://api.port.io/v1/ai/invoke' \
448450
-H 'Content-Type: application/json' \
449451
--data-raw '{
450452
"prompt": "What services are failing health checks?",
451-
"tools": ["^(list|get|search)_.*"],
453+
"tools": ["^(list|get|search|count)_.*"],
452454
"labels": {
453455
"source": "monitoring_system",
454456
"check_type": "health_analysis"
@@ -476,7 +478,7 @@ async function checkServiceHealth(serviceName) {
476478
headers: { 'Content-Type': 'application/json' },
477479
body: JSON.stringify({
478480
prompt: `Analyze the health of service ${serviceName}`,
479-
tools: ['^(list|get|search)_.*'],
481+
tools: ['^(list|get|search|count)_.*'],
480482
labels: {
481483
source: 'monitoring_dashboard',
482484
service: serviceName,
@@ -531,7 +533,7 @@ Automatically trigger Port AI based on catalog events using Port's automation sy
531533
},
532534
"body": {
533535
"prompt": "Infrastructure component {{ .event.diff.after.title }} is unhealthy. Analyze the issue and suggest remediation steps based on current state and recent changes.",
534-
"tools": ["^(list|get|search)_.*", "run_.*incident.*", "run_.*notification.*"],
536+
"tools": ["^(list|get|search|count)_.*", "run_.*incident.*", "run_.*notification.*"],
535537
"labels": {
536538
"source": "automation",
537539
"entity_type": "{{ .event.diff.after.blueprint }}",
@@ -571,7 +573,7 @@ Create actions that invoke Port AI for on-demand analysis:
571573
},
572574
"body": {
573575
"prompt": "Analyze the health of service {{ .entity.title }}. Check metrics, recent deployments, incidents, and provide actionable recommendations.",
574-
"tools": ["^(list|get|search)_.*", "run_.*incident.*"],
576+
"tools": ["^(list|get|search|count)_.*", "run_.*incident.*"],
575577
"labels": {
576578
"source": "self_service",
577579
"service_name": "{{ .entity.identifier }}",

0 commit comments

Comments
 (0)