MCPcopy Create free account

hub / github.com/anthropics/anthropic-sdk-go / functions

Functions17,396 in github.com/anthropics/anthropic-sdk-go

↓ 4,208 callersFunctionUnmarshalRoot
UnmarshalRoot is like Unmarshal, but doesn't try to call MarshalJSON on the root element. Useful if a struct's UnmarshalJSON is overrode to use the be
internal/apijson/decoder.go:35
↓ 716 callersFunctionmarshalString
(v T)
shared/constant/constants.go:2709
↓ 685 callersFunctionMarshalObject
MarshalObject uses a shimmed 'encoding/json' from Go 1.24, to support the 'omitzero' tag Stability for the API of MarshalObject is not guaranteed.
packages/param/encoder.go:36
↓ 610 callersMethodErrorf
(string, ...any)
betasessiontoolrunner_fake_test.go:1851
↓ 545 callersMethodError
()
mcp/mcp.go:30
↓ 518 callersFunctionWithBaseURL
WithBaseURL returns a RequestOption that sets the BaseURL for the client. For security reasons, ensure that the base URL is trusted.
option/requestoption.go:152
↓ 516 callersFunctionWithAPIKey
WithAPIKey returns a RequestOption that sets the client setting "api_key". This is a credential option. See anthropic.NewClient for how those combine
option/requestoption.go:604
↓ 490 callersMethodNew
Create Skill When the returned error is an [*apierror.Error], compare the [apierror.Error.ErrorCode] against these values. - [ErrorCodeClaudeCodeKey
skill.go:57
↓ 471 callersMethodString
()
packages/param/option.go:51
↓ 436 callersFunctionWithSpan
WithSpan returns a RequestOption that describes the OpenTelemetry span of the call: the span's name, the path of the endpoint as the API description g
internal/requestconfig/otel.go:90
↓ 431 callersMethodDumpRequest
DumpRequest returns the request in HTTP/1.x wire format, with sensitive header values redacted, or nil if Request is nil.
internal/apierror/apierror.go:134
↓ 426 callersFunctionCheckTestServer
(t *testing.T, url string)
internal/testutil/testutil.go:10
↓ 407 callersMethodSet
Set a spend limit. Upsert keyed on (scope, period): setting a limit that already exists overwrites it in place. A Claude Enterprise organization sets
betaorganizationspendlimit.go:167
↓ 352 callersMethodGet
(rel string)
lib/environments/memories.go:181
↓ 337 callersFunctionIsOmitted
IsOmitted returns true if v is the zero value of its type. If IsOmitted is true, and the field uses a `json:"...,omitzero"` tag, the field will be om
packages/param/param.go:63
↓ 325 callersFunctionWithQualifiers
WithQualifiers returns a RequestOption that sets the query pairs that tell the operation apart from the others with its path in the OpenAPI document.
internal/requestconfig/requestconfig.go:888
↓ 322 callersFunctionWithQuery
WithQuery returns a RequestOption that sets the query value to the associated key. It overwrites any value if there was one already present.
option/requestoption.go:268
↓ 318 callersFunctionExecuteNewRequest
(ctx context.Context, method string, u string, body any, dst any, opts ...RequestOption)
internal/requestconfig/requestconfig.go:813
↓ 301 callersFunctionEscapePathSegment
EscapePathSegment percent-encodes every byte of s except ASCII letters, digits and - . _ ~ ! $ & ' ( ) * + , ; = : @, which RFC 3986 allows in a path
internal/requestconfig/url.go:53
↓ 298 callersMethodRun
Run Deployment Now
betadeployment.go:220
↓ 297 callersFunctionWithHeader
WithHeader returns a RequestOption that sets the header value to the associated key. It overwrites any value if there was one already present.
option/requestoption.go:242
↓ 297 callersFunctionWithSpanAttribute
WithSpanAttribute returns a RequestOption that sets the attribute key of the call's OpenTelemetry span to value: a resource ID that the SDK method has
internal/requestconfig/otel.go:110
↓ 258 callersFunctionat
(now float64)
betasessiontoolrunner_fake_test.go:460
↓ 254 callersMethodContains
Contains reports whether a comma-separated list of options contains a particular substr flag. substr must be surrounded by a string boundary or commas
internal/encoding/json/tags.go:25
↓ 192 callersMethodValid
()
packages/param/option.go:116
↓ 190 callersMethodClose
()
betatoolrunner.go:848
↓ 177 callersFunctionMarshalUnion
MarshalUnion uses a shimmed 'encoding/json' from Go 1.24, to support the 'omitzero' tag Stability for the API of MarshalUnion is not guaranteed.
packages/param/encoder.go:82
↓ 165 callersFunctionAddrOrDefault
(v T)
internal/paramutil/constant.go:3
↓ 144 callersFunctionMarshalWithSettings
(value any, settings QuerySettings)
internal/apiquery/query.go:10
↓ 143 callersMethodrequiringAction
(calls ...fakeCall)
betasessiontoolrunner_fake_test.go:507
↓ 139 callersMethodErr
()
betatoolrunner.go:847
↓ 139 callersFunctionreply
reply is a whole reply with one text block.
betamessagethreadutil_test.go:229
↓ 138 callersMethodat
(now float64)
betasessiontoolrunner_fake_test.go:462
↓ 137 callersFunctionAddrIfPresent
(v param.Opt[T])
internal/paramutil/field.go:8
↓ 137 callersMethodList
List Files When the returned error is an [*apierror.Error], compare the [apierror.Error.ErrorCode] against these values. - [ErrorCodeClaudeCodeKeyCr
file.go:54
↓ 132 callersFunctionrunSession
(t *testing.T, steps schedule, opts runOptions)
betasessiontoolrunner_fake_test.go:1453
↓ 130 callersFunctionnewTracedClient
(t *testing.T, rt http.RoundTripper, opts ...option.RequestOption)
opentelemetry_test.go:104
↓ 125 callersFunctionNewRequestConfig
(ctx context.Context, method string, u string, body any, dst any, opts ...RequestOption)
internal/requestconfig/requestconfig.go:93
↓ 124 callersMethodExecute
Execute sends the request until an attempt ends the call, which is one of: - an attempt without a response (a connection error, a timeout of the atte
internal/requestconfig/requestconfig.go:558
↓ 123 callersMethodSetPageConfig
(cfg *requestconfig.RequestConfig, res *http.Response)
packages/pagination/pagination.go:87
↓ 120 callersFunctionWithResponseInto
WithResponseInto returns a RequestOption that copies the [*http.Response] into the given address.
option/requestoption.go:356
↓ 118 callersFunctionmessagesOf
(messages ...string)
betamessagethreadutil_test.go:214
↓ 112 callersFunctionuserJSON
(text string)
betamessagethreadutil_test.go:202
↓ 109 callersFunctioneach
(t *testing.T, cases map[K]V, test func(t *testing.T, c V))
betasessiontoolrunner_test.go:68
↓ 108 callersFunctionwantAttrs
(t *testing.T, span sdktrace.ReadOnlySpan, want map[string]any)
opentelemetry_test.go:137
↓ 107 callersMethodAdd
Add Session Resource
betasessionresource.go:183
↓ 106 callersFunctionrunWorkers
(t *testing.T, steps schedule, opts workerOptions)
environmentworker_fake_test.go:775
↓ 102 callersFunctionturn
turn returns the params of a turn that sends one user message.
betamessagethreadutil_test.go:179
↓ 100 callersMethodNext
()
betatoolrunner.go:845
↓ 100 callersFunctionrespond
respond returns a transport that answers every request with status, headers, and body.
opentelemetry_test.go:60
↓ 99 callersFunctionnewThread
newThread returns a thread on a client of a server that answers with script.
betamessagethreadutil_test.go:145
↓ 95 callersFunctionNewPageCursorAutoPager
(page *PageCursor[T], err error)
packages/pagination/pagination.go:327
↓ 95 callersFunctionsend
(t *testing.T, thread *BetaMessageThread, params BetaMessageThreadSendParams, opts ...option.RequestOption)
betamessagethreadutil_test.go:362
↓ 94 callersMethodNow
()
lib/environments/memories_test.go:556
↓ 91 callersMethodof
(kinds ...string)
environmentworker_fake_test.go:136
↓ 90 callersFunctionthreadParams
()
betamessagethreadutil_test.go:152
↓ 89 callersFunctiononlySpan
(t *testing.T, recorder *spanRecorder)
opentelemetry_test.go:125
↓ 88 callersMethodCleanup
Cleanup removes the per-skill directories [AgentToolContext.SetupSkillsFromSession] downloaded under {Workdir}/skills — exactly those, and nothing els
tools/agenttoolset/skills.go:140
↓ 88 callersFunctionforEachRunner
(t *testing.T, test func(t *testing.T, stream bool))
betatoolrunner_test.go:1628
↓ 85 callersFunctionWithMaxRetries
WithMaxRetries returns a RequestOption that sets the maximum number of retries that the client attempts to make. When given 0, the client only makes o
option/requestoption.go:230
↓ 85 callersMethodrequireRequests
requireRequests requires that the server received n requests and returns them.
betamessagethreadutil_test.go:137
↓ 82 callersMethodName
Name returns the tool's name
betatoolrunner.go:29
↓ 73 callersFunctionmustJSON
(t *testing.T, v any)
tools/agenttoolset/fs_test.go:18
↓ 70 callersFunctionassistantJSON
(text string)
betamessagethreadutil_test.go:210
↓ 67 callersMethodemitCalls
(calls ...fakeCall)
betasessiontoolrunner_fake_test.go:530
↓ 66 callersMethodNewToolRunner
NewToolRunner creates a [BetaToolRunner] whose turns are turns of this thread, and sends no request. During the run, change request fields through the
betatoolrunner.go:204
↓ 65 callersMethodReceivedSnapshot
()
lib/environments/memories_test.go:172
↓ 64 callersMethodType
Type returns the error type from the API response body, e.g. "rate_limit_error" or "overloaded_error". Returns "" if the response body did not contain
internal/apierror/apierror.go:51
↓ 62 callersFunctionBetaRefusalFallbackMiddleware
BetaRefusalFallbackMiddleware retries a refused Messages request on each model of fallbacks in turn, so a refusal costs a retry instead of surfacing t
lib/betafallback/betafallback.go:117
↓ 62 callersFunctionWithHTTPClient
WithHTTPClient returns a RequestOption that changes the underlying http client used to make this request, which by default is [http.DefaultClient]. F
option/requestoption.go:186
↓ 62 callersMethodrun
run calls onMessage with each message until the run is over and returns the messages' ids.
betatoolrunner_test.go:1602
↓ 61 callersFunctionafter
after is the time that backoffs, each shortened by up to half, take from start.
betasessiontoolrunner_test.go:83
↓ 61 callersFunctiondownloadedStores
downloadedStores returns a SessionMemoryStores with the fake server's one store already downloaded to disk, plus the local dir and the server handle.
lib/environments/memories_test.go:533
↓ 61 callersFunctionrequireCreate
requireCreate requires a request that creates a thread with messages.
betamessagethreadutil_test.go:337
↓ 61 callersFunctionrequireJSONEqual
(t *testing.T, got, want string)
betatoolrunner_test.go:1396
↓ 61 callersFunctionrunTool
runTool executes a BetaTool the way a session/Messages tool runner would and flattens the outcome to (text, isError) — the shape the tests assert on.
tools/agenttoolset/helpers_test.go:14
↓ 59 callersMethodMessages
Messages returns a copy of the current conversation history. The returned slice can be safely modified without affecting the runner's state.
betatoolrunner.go:308
↓ 59 callersMethodUpdate
Update Agent
betaagent.go:100
↓ 59 callersFunctionrunSync
runSync drives one reconcile pass without clock bookkeeping. The public cadence path (SyncIfDue plus the clock) is exercised by the worker tests; uni
lib/environments/memories_test.go:569
↓ 59 callersMethodtimes
()
environmentworker_fake_test.go:150
↓ 58 callersMethodClone
(ctx context.Context)
internal/requestconfig/requestconfig.go:821
↓ 58 callersFunctionWithSpanCreatedID
WithSpanCreatedID returns a RequestOption for a method that creates one object and decodes it into *res: the call's OpenTelemetry span gets the attrib
internal/requestconfig/otel.go:132
↓ 58 callersFunctionmapSlice
(in []T, f func(T) U)
betasessiontoolrunner_fake_test.go:145
↓ 57 callersFunctioneachOf
(t *testing.T, cases []V, test func(t *testing.T, c V))
betasessiontoolrunner_test.go:73
↓ 56 callersMethodrequests
()
betamessagethreadutil_test.go:130
↓ 55 callersFunctionuntil
(s float64)
environmentworker_test.go:65
↓ 54 callersFunctionmessageParams
()
opentelemetry_test.go:117
↓ 54 callersFunctionrequireContinue
requireContinue requires a request that continues from previousMessageID with messages, and carries neither system nor tools.
betamessagethreadutil_test.go:345
↓ 53 callersMethodEncode
Encode writes the JSON encoding of v to the stream, with insignificant space characters elided, followed by a newline character. See the documentatio
internal/encoding/json/stream.go:201
↓ 53 callersMethodRemove
(rel string)
lib/environments/memories.go:184
↓ 52 callersMethodWrite
(p []byte)
internal/auth/test_helpers_test.go:15
↓ 51 callersMethodNewStreaming
Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation. The Messag
message.go:173
↓ 51 callersFunctionWithOpenTelemetryTracesContentMode
WithOpenTelemetryTracesContentMode returns a RequestOption that sets whether the OpenTelemetry spans of API calls carry the content of requests and re
option/tracing.go:76
↓ 49 callersMethodfailFor
(client, kind string, status, times int)
environmentworker_fake_test.go:350
↓ 49 callersFunctionrequireWithin
requireWithin allows for the milliseconds that the fake's responses take.
betasessiontoolrunner_test.go:92
↓ 48 callersMethodand
(other schedule)
betasessiontoolrunner_fake_test.go:464
↓ 48 callersMethodfield
field returns the JSON of a body field, or "" when the body has none.
betamessagethreadutil_test.go:48
↓ 47 callersMethodDelete
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and res
client.go:329
↓ 47 callersMethodIs
Is reports whether target is [ErrNoCredentials]. Enables callers to detect the no-credentials class with [errors.Is] in addition to [errors.As] agains
internal/auth/error.go:117
↓ 47 callersFunctionreadLocal
(t *testing.T, dir, name string)
lib/environments/memories_test.go:578
next →1–100 of 17,396, ranked by callers